cpufreq: Loongson2: constify platform_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sun, 13 Aug 2017 09:40:06 +0000 (15:10 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 17 Aug 2017 23:44:21 +0000 (01:44 +0200)
platform_device_id are not supposed to change at runtime. All functions
working with platform_device_id provided by <linux/platform_device.h>
work with const platform_device_id. So mark the non-const structs as
const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/loongson2_cpufreq.c

index 9ac27b22476cd10437c13a870cc383b7441b9ff0..da344696beed7ff611a40c58582ffcf39bc79d2d 100644 (file)
@@ -114,7 +114,7 @@ static struct cpufreq_driver loongson2_cpufreq_driver = {
        .attr = cpufreq_generic_attr,
 };
 
-static struct platform_device_id platform_device_ids[] = {
+static const struct platform_device_id platform_device_ids[] = {
        {
                .name = "loongson2_cpufreq",
        },