All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@163.com>
To: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Geliang Tang <geliangtang@163.com>,
	linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 01/10] PM / devfreq: exynos: use to_platform_device()
Date: Sun, 27 Dec 2015 21:15:39 +0800	[thread overview]
Message-ID: <a554e6af3a3528c2206c94dab62b7800f96caa4b.1451221174.git.geliangtang@163.com> (raw)

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/devfreq/exynos/exynos4_bus.c | 3 +--
 drivers/devfreq/exynos/exynos5_bus.c | 9 +++------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/devfreq/exynos/exynos4_bus.c b/drivers/devfreq/exynos/exynos4_bus.c
index da95092..e3124bf 100644
--- a/drivers/devfreq/exynos/exynos4_bus.c
+++ b/drivers/devfreq/exynos/exynos4_bus.c
@@ -566,8 +566,7 @@ static int exynos4_bus_target(struct device *dev, unsigned long *_freq,
 			      u32 flags)
 {
 	int err = 0;
-	struct platform_device *pdev = container_of(dev, struct platform_device,
-						    dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct busfreq_data *data = platform_get_drvdata(pdev);
 	struct dev_pm_opp *opp;
 	unsigned long freq;
diff --git a/drivers/devfreq/exynos/exynos5_bus.c b/drivers/devfreq/exynos/exynos5_bus.c
index 297ea30..81da78e 100644
--- a/drivers/devfreq/exynos/exynos5_bus.c
+++ b/drivers/devfreq/exynos/exynos5_bus.c
@@ -85,8 +85,7 @@ static int exynos5_busfreq_int_target(struct device *dev, unsigned long *_freq,
 			      u32 flags)
 {
 	int err = 0;
-	struct platform_device *pdev = container_of(dev, struct platform_device,
-						    dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct busfreq_data_int *data = platform_get_drvdata(pdev);
 	struct dev_pm_opp *opp;
 	unsigned long old_freq, freq;
@@ -145,8 +144,7 @@ out:
 static int exynos5_int_get_dev_status(struct device *dev,
 				      struct devfreq_dev_status *stat)
 {
-	struct platform_device *pdev = container_of(dev, struct platform_device,
-						    dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct busfreq_data_int *data = platform_get_drvdata(pdev);
 	struct busfreq_ppmu_data *ppmu_data = &data->ppmu_data;
 	int busier_dmc;
@@ -370,8 +368,7 @@ static int exynos5_busfreq_int_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM_SLEEP
 static int exynos5_busfreq_int_resume(struct device *dev)
 {
-	struct platform_device *pdev = container_of(dev, struct platform_device,
-						    dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct busfreq_data_int *data = platform_get_drvdata(pdev);
 	struct busfreq_ppmu_data *ppmu_data = &data->ppmu_data;
 
-- 
2.5.0



WARNING: multiple messages have this Message-ID (diff)
From: geliangtang@163.com (Geliang Tang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/10] PM / devfreq: exynos: use to_platform_device()
Date: Sun, 27 Dec 2015 21:15:39 +0800	[thread overview]
Message-ID: <a554e6af3a3528c2206c94dab62b7800f96caa4b.1451221174.git.geliangtang@163.com> (raw)

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/devfreq/exynos/exynos4_bus.c | 3 +--
 drivers/devfreq/exynos/exynos5_bus.c | 9 +++------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/devfreq/exynos/exynos4_bus.c b/drivers/devfreq/exynos/exynos4_bus.c
index da95092..e3124bf 100644
--- a/drivers/devfreq/exynos/exynos4_bus.c
+++ b/drivers/devfreq/exynos/exynos4_bus.c
@@ -566,8 +566,7 @@ static int exynos4_bus_target(struct device *dev, unsigned long *_freq,
 			      u32 flags)
 {
 	int err = 0;
-	struct platform_device *pdev = container_of(dev, struct platform_device,
-						    dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct busfreq_data *data = platform_get_drvdata(pdev);
 	struct dev_pm_opp *opp;
 	unsigned long freq;
diff --git a/drivers/devfreq/exynos/exynos5_bus.c b/drivers/devfreq/exynos/exynos5_bus.c
index 297ea30..81da78e 100644
--- a/drivers/devfreq/exynos/exynos5_bus.c
+++ b/drivers/devfreq/exynos/exynos5_bus.c
@@ -85,8 +85,7 @@ static int exynos5_busfreq_int_target(struct device *dev, unsigned long *_freq,
 			      u32 flags)
 {
 	int err = 0;
-	struct platform_device *pdev = container_of(dev, struct platform_device,
-						    dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct busfreq_data_int *data = platform_get_drvdata(pdev);
 	struct dev_pm_opp *opp;
 	unsigned long old_freq, freq;
@@ -145,8 +144,7 @@ out:
 static int exynos5_int_get_dev_status(struct device *dev,
 				      struct devfreq_dev_status *stat)
 {
-	struct platform_device *pdev = container_of(dev, struct platform_device,
-						    dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct busfreq_data_int *data = platform_get_drvdata(pdev);
 	struct busfreq_ppmu_data *ppmu_data = &data->ppmu_data;
 	int busier_dmc;
@@ -370,8 +368,7 @@ static int exynos5_busfreq_int_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM_SLEEP
 static int exynos5_busfreq_int_resume(struct device *dev)
 {
-	struct platform_device *pdev = container_of(dev, struct platform_device,
-						    dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct busfreq_data_int *data = platform_get_drvdata(pdev);
 	struct busfreq_ppmu_data *ppmu_data = &data->ppmu_data;
 
-- 
2.5.0

             reply	other threads:[~2015-12-27 13:17 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-27 13:15 Geliang Tang [this message]
2015-12-27 13:15 ` [PATCH 01/10] PM / devfreq: exynos: use to_platform_device() Geliang Tang
2015-12-27 13:15 ` [PATCH 02/10] spi: cadence, zynq: " Geliang Tang
2015-12-27 13:15   ` Geliang Tang
2015-12-27 13:15   ` Geliang Tang
2015-12-29 18:01   ` Moritz Fischer
2015-12-29 18:01     ` Moritz Fischer
2015-12-29 18:01     ` Moritz Fischer
2015-12-30 14:57     ` [PATCH 1/2] spi: cadence: " Geliang Tang
2015-12-30 14:57       ` Geliang Tang
2015-12-30 14:57       ` [PATCH 2/2] spi: zynq: " Geliang Tang
2015-12-30 14:57         ` Geliang Tang
2015-12-30 14:57         ` Geliang Tang
     [not found]         ` <917c5adcc61a2a9e6390c0fe54445aa7c8642462.1451485340.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
2016-01-05 12:33           ` Applied "spi: zynq: use to_platform_device()" to the spi tree Mark Brown
2015-12-30 17:02       ` [PATCH 1/2] spi: cadence: use to_platform_device() Mark Brown
2015-12-30 17:02         ` Mark Brown
     [not found]       ` <eba9c4fde1cf48cc56afba6275a4efdda998cbbe.1451485340.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
2016-01-05 12:33         ` Applied "spi: cadence: use to_platform_device()" to the spi tree Mark Brown
2015-12-27 13:15 ` [PATCH 03/10] dmaengine: ppc4xx: use to_platform_device() Geliang Tang
2016-01-06  9:22   ` Vinod Koul
2016-01-18 16:02     ` [PATCH 03/10 v2] " Geliang Tang
2015-12-27 13:15 ` [PATCH 04/10] i2c: st: " Geliang Tang
2015-12-27 13:15   ` Geliang Tang
2015-12-27 13:15   ` Geliang Tang
2016-01-03 18:55   ` Wolfram Sang
2016-01-03 18:55     ` Wolfram Sang
2015-12-27 13:15 ` [PATCH 05/10] mmc: cb710: " Geliang Tang
2015-12-28 13:29   ` Ulf Hansson
2015-12-27 13:15 ` [PATCH 06/10] net: hns: " Geliang Tang
2015-12-27 13:23   ` Andy Shevchenko
2015-12-27 17:03     ` Geliang Tang
2015-12-29 20:47   ` David Miller
2015-12-27 13:15 ` [PATCH 07/10] platform/chrome: " Geliang Tang
2016-03-06 22:15   ` Olof Johansson
2015-12-27 13:15 ` [PATCH 08/10] staging: fbtft: " Geliang Tang
2015-12-27 13:15 ` [PATCH 09/10] watchdog: cadence_wdt: " Geliang Tang
2015-12-27 15:27   ` Guenter Roeck
2015-12-27 20:17   ` Wim Van Sebroeck
2015-12-27 13:17 ` [PATCH 10/10] ARM: plat-samsung: " Geliang Tang
2015-12-27 13:17   ` Geliang Tang
2015-12-28  2:01   ` Krzysztof Kozlowski
2015-12-28  2:01     ` Krzysztof Kozlowski
2016-01-25  7:09     ` Krzysztof Kozlowski
2016-01-25  7:09       ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a554e6af3a3528c2206c94dab62b7800f96caa4b.1451221174.git.geliangtang@163.com \
    --to=geliangtang@163.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.