Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1375755

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

From Keguang Zhang <keguang.zhang@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 3/5] cpufreq: Loongson1: Use dev_get_platdata() to get platform_data
Date 2016-04-11 14:00 +0200
Message-ID <rmIFA-5ju-15@gated-at.bofh.it> (permalink)
References <rmIFA-5ju-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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;
 
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/5] cpufreq: Loongson1: Rename the file to loongson1-cpufreq.c Keguang Zhang <keguang.zhang@gmail.com> - 2016-04-11 14:00 +0200
  [PATCH 3/5] cpufreq: Loongson1: Use dev_get_platdata() to get platform_data Keguang Zhang <keguang.zhang@gmail.com> - 2016-04-11 14:00 +0200
    Re: [PATCH 3/5] cpufreq: Loongson1: Use dev_get_platdata() to get  platform_data Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-12 07:20 +0200
  [PATCH 5/5] cpufreq: Loongson1: Replace goto out with return in ls1x_cpufreq_probe() Keguang Zhang <keguang.zhang@gmail.com> - 2016-04-11 14:00 +0200
    Re: [PATCH 5/5] cpufreq: Loongson1: Replace goto out with return in  ls1x_cpufreq_probe() Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-12 07:30 +0200
  [PATCH 4/5] cpufreq: Loongson1: Use devm_kzalloc() instead of global structure Keguang Zhang <keguang.zhang@gmail.com> - 2016-04-11 14:00 +0200
    Re: [PATCH 4/5] cpufreq: Loongson1: Use devm_kzalloc() instead of  global structure Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-12 07:30 +0200
  Re: [PATCH 1/5] cpufreq: Loongson1: Rename the file to  loongson1-cpufreq.c Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-12 07:20 +0200

csiph-web