diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2023-02-07 19:58:18 +0000 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-02-09 20:29:32 +0100 |
commit | 108fcad91109bd7e9374ae9d509085f5ec55799b (patch) | |
tree | cee9fa67216de8a308063063c47b0e7987cc8b91 /drivers/cpufreq/cpufreq.c | |
parent | 5d8f384a9b4fc50f6a18405f1c08e5a87a77b5b3 (diff) | |
download | linux-stable-108fcad91109bd7e9374ae9d509085f5ec55799b.tar.gz linux-stable-108fcad91109bd7e9374ae9d509085f5ec55799b.tar.bz2 linux-stable-108fcad91109bd7e9374ae9d509085f5ec55799b.zip |
cpufreq: Make kobj_type structure constant
Since commit ee6d3dd4ed48 ("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 <linux@weissschuh.net>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 85a0bea2dbf1..6d8fd3b8dcb5 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -993,7 +993,7 @@ static const struct sysfs_ops sysfs_ops = { .store = store, }; -static struct kobj_type ktype_cpufreq = { +static const struct kobj_type ktype_cpufreq = { .sysfs_ops = &sysfs_ops, .default_groups = cpufreq_groups, .release = cpufreq_sysfs_release, |