Skip to content

Commit 70ba26c

Browse files
t-8chrafaeljw
authored andcommitted
cpufreq: schedutil: make kobj_type structure constant
Since commit ee6d3dd ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 7af7802 commit 70ba26c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/cpufreq_schedutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ static void sugov_tunables_free(struct kobject *kobj)
546546
kfree(to_sugov_tunables(attr_set));
547547
}
548548

549-
static struct kobj_type sugov_tunables_ktype = {
549+
static const struct kobj_type sugov_tunables_ktype = {
550550
.default_groups = sugov_groups,
551551
.sysfs_ops = &governor_sysfs_ops,
552552
.release = &sugov_tunables_free,

0 commit comments

Comments
 (0)