CPUFREQ: Loongson1: Use dev_get_platdata() to get platform_data
authorKelvin Cheung <keguang.zhang@gmail.com>
Tue, 12 Apr 2016 10:40:17 +0000 (18:40 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 12:02:08 +0000 (14:02 +0200)
This patch uses dev_get_platdata() to get the platform_data
instead of referencing it directly.

Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: linux-pm@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/13054/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/cpufreq/loongson1-cpufreq.c

index 4c3087f9f66814cebd88969c74d902896f64d48b..1b63b4a3313370fea128acd39626231f78b47d0a 100644 (file)
@@ -134,7 +134,7 @@ static int ls1x_cpufreq_remove(struct platform_device *pdev)
 
 static int ls1x_cpufreq_probe(struct platform_device *pdev)
 {
-       struct plat_ls1x_cpufreq *pdata = pdev->dev.platform_data;
+       struct plat_ls1x_cpufreq *pdata = dev_get_platdata(&pdev->dev);
        struct clk *clk;
        int ret;