Skip to content

Commit 108fcad

Browse files
t-8chrafaeljw
authored andcommitted
cpufreq: 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 5d8f384 commit 108fcad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cpufreq/cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ static const struct sysfs_ops sysfs_ops = {
993993
.store = store,
994994
};
995995

996-
static struct kobj_type ktype_cpufreq = {
996+
static const struct kobj_type ktype_cpufreq = {
997997
.sysfs_ops = &sysfs_ops,
998998
.default_groups = cpufreq_groups,
999999
.release = cpufreq_sysfs_release,

0 commit comments

Comments
 (0)