* [PATCH 01/10] PM / devfreq: exynos: use to_platform_device()
@ 2015-12-27 13:15 Geliang Tang
2015-12-27 13:17 ` [PATCH 10/10] ARM: plat-samsung: " Geliang Tang
0 siblings, 1 reply; 4+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
To: MyungJoo Ham, Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski
Cc: Geliang Tang, linux-pm, linux-arm-kernel, linux-samsung-soc,
linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 10/10] ARM: plat-samsung: use to_platform_device()
2015-12-27 13:15 [PATCH 01/10] PM / devfreq: exynos: use to_platform_device() Geliang Tang
@ 2015-12-27 13:17 ` Geliang Tang
2015-12-28 2:01 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Geliang Tang @ 2015-12-27 13:17 UTC (permalink / raw)
To: Kukjin Kim, Krzysztof Kozlowski, Russell King
Cc: Geliang Tang, linux-arm-kernel, linux-samsung-soc, linux-kernel
Use to_platform_device() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
arch/arm/plat-samsung/adc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index efa6e85..daf3db9 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -422,8 +422,7 @@ static int s3c_adc_remove(struct platform_device *pdev)
#ifdef CONFIG_PM
static int s3c_adc_suspend(struct device *dev)
{
- struct platform_device *pdev = container_of(dev,
- struct platform_device, dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct adc_device *adc = platform_get_drvdata(pdev);
unsigned long flags;
u32 con;
@@ -444,8 +443,7 @@ static int s3c_adc_suspend(struct device *dev)
static int s3c_adc_resume(struct device *dev)
{
- struct platform_device *pdev = container_of(dev,
- struct platform_device, dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct adc_device *adc = platform_get_drvdata(pdev);
enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data;
int ret;
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 10/10] ARM: plat-samsung: use to_platform_device()
2015-12-27 13:17 ` [PATCH 10/10] ARM: plat-samsung: " Geliang Tang
@ 2015-12-28 2:01 ` Krzysztof Kozlowski
2016-01-25 7:09 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2015-12-28 2:01 UTC (permalink / raw)
To: Geliang Tang, Kukjin Kim, Russell King
Cc: linux-arm-kernel, linux-samsung-soc, linux-kernel
On 27.12.2015 22:17, Geliang Tang wrote:
> Use to_platform_device() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> arch/arm/plat-samsung/adc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Thanks!
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 10/10] ARM: plat-samsung: use to_platform_device()
2015-12-28 2:01 ` Krzysztof Kozlowski
@ 2016-01-25 7:09 ` Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2016-01-25 7:09 UTC (permalink / raw)
To: Geliang Tang, Kukjin Kim, Russell King
Cc: linux-arm-kernel, linux-samsung-soc, linux-kernel
On 28.12.2015 11:01, Krzysztof Kozlowski wrote:
> On 27.12.2015 22:17, Geliang Tang wrote:
>> Use to_platform_device() instead of open-coding it.
>>
>> Signed-off-by: Geliang Tang <geliangtang@163.com>
>> ---
>> arch/arm/plat-samsung/adc.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> Thanks!
>
> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Applied, thanks,
https://git.kernel.org/cgit/linux/kernel/git/krzk/linux.git/log/?h=next/soc
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-01-25 7:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-27 13:15 [PATCH 01/10] PM / devfreq: exynos: use to_platform_device() Geliang Tang
2015-12-27 13:17 ` [PATCH 10/10] ARM: plat-samsung: " Geliang Tang
2015-12-28 2:01 ` Krzysztof Kozlowski
2016-01-25 7:09 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox