diff mbox

[3/5] cpufreq: Loongson1: Use dev_get_platdata() to get platform_data

Message ID 1460375759-20705-3-git-send-email-keguang.zhang@gmail.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Keguang Zhang April 11, 2016, 11:55 a.m. UTC
From: Kelvin Cheung <keguang.zhang@gmail.com>

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>
---
 drivers/cpufreq/loongson1-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Viresh Kumar April 12, 2016, 5:18 a.m. UTC | #1
On 11-04-16, 19:55, Keguang Zhang wrote:
> From: Kelvin Cheung <keguang.zhang@gmail.com>
> 
> 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>
> ---
>  drivers/cpufreq/loongson1-cpufreq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/loongson1-cpufreq.c b/drivers/cpufreq/loongson1-cpufreq.c
> index 2d83744..f0d40fd 100644
> --- a/drivers/cpufreq/loongson1-cpufreq.c
> +++ b/drivers/cpufreq/loongson1-cpufreq.c
> @@ -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;

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
diff mbox

Patch

diff --git a/drivers/cpufreq/loongson1-cpufreq.c b/drivers/cpufreq/loongson1-cpufreq.c
index 2d83744..f0d40fd 100644
--- a/drivers/cpufreq/loongson1-cpufreq.c
+++ b/drivers/cpufreq/loongson1-cpufreq.c
@@ -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;