* [PATCH 01/10] PM / devfreq: exynos: use to_platform_device()
@ 2015-12-27 13:15 Geliang Tang
2015-12-27 13:15 ` [PATCH 02/10] spi: cadence, zynq: " Geliang Tang
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
To: linux-arm-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] 8+ messages in thread
* [PATCH 02/10] spi: cadence, zynq: 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:15 ` Geliang Tang
2015-12-29 18:01 ` Moritz Fischer
2015-12-27 13:15 ` [PATCH 04/10] i2c: st: " Geliang Tang
2015-12-27 13:17 ` [PATCH 10/10] ARM: plat-samsung: " Geliang Tang
2 siblings, 1 reply; 8+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
To: linux-arm-kernel
Use to_platform_device() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/spi/spi-cadence.c | 6 ++----
drivers/spi/spi-zynqmp-gqspi.c | 8 ++------
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index 5a67498..121a413 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -617,8 +617,7 @@ static int cdns_spi_remove(struct platform_device *pdev)
*/
static int __maybe_unused cdns_spi_suspend(struct device *dev)
{
- struct platform_device *pdev = container_of(dev,
- struct platform_device, dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct spi_master *master = platform_get_drvdata(pdev);
struct cdns_spi *xspi = spi_master_get_devdata(master);
@@ -641,8 +640,7 @@ static int __maybe_unused cdns_spi_suspend(struct device *dev)
*/
static int __maybe_unused cdns_spi_resume(struct device *dev)
{
- struct platform_device *pdev = container_of(dev,
- struct platform_device, dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct spi_master *master = platform_get_drvdata(pdev);
struct cdns_spi *xspi = spi_master_get_devdata(master);
int ret = 0;
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index f23f36e..aab9b49 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -917,9 +917,7 @@ static int zynqmp_qspi_start_transfer(struct spi_master *master,
*/
static int __maybe_unused zynqmp_qspi_suspend(struct device *dev)
{
- struct platform_device *pdev = container_of(dev,
- struct platform_device,
- dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct spi_master *master = platform_get_drvdata(pdev);
spi_master_suspend(master);
@@ -940,9 +938,7 @@ static int __maybe_unused zynqmp_qspi_suspend(struct device *dev)
*/
static int __maybe_unused zynqmp_qspi_resume(struct device *dev)
{
- struct platform_device *pdev = container_of(dev,
- struct platform_device,
- dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct spi_master *master = platform_get_drvdata(pdev);
struct zynqmp_qspi *xqspi = spi_master_get_devdata(master);
int ret = 0;
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 04/10] i2c: st: 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:15 ` [PATCH 02/10] spi: cadence, zynq: " Geliang Tang
@ 2015-12-27 13:15 ` Geliang Tang
2016-01-03 18:55 ` Wolfram Sang
2015-12-27 13:17 ` [PATCH 10/10] ARM: plat-samsung: " Geliang Tang
2 siblings, 1 reply; 8+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
To: linux-arm-kernel
Use to_platform_device() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/i2c/busses/i2c-st.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
index 25020ec..6ee7715 100644
--- a/drivers/i2c/busses/i2c-st.c
+++ b/drivers/i2c/busses/i2c-st.c
@@ -708,8 +708,7 @@ static int st_i2c_xfer(struct i2c_adapter *i2c_adap,
#ifdef CONFIG_PM_SLEEP
static int st_i2c_suspend(struct device *dev)
{
- struct platform_device *pdev =
- container_of(dev, struct platform_device, dev);
+ struct platform_device *pdev = to_platform_device(dev);
struct st_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
if (i2c_dev->busy)
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ 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:15 ` [PATCH 02/10] spi: cadence, zynq: " Geliang Tang
2015-12-27 13:15 ` [PATCH 04/10] i2c: st: " Geliang Tang
@ 2015-12-27 13:17 ` Geliang Tang
2015-12-28 2:01 ` Krzysztof Kozlowski
2 siblings, 1 reply; 8+ messages in thread
From: Geliang Tang @ 2015-12-27 13:17 UTC (permalink / raw)
To: linux-arm-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] 8+ messages in thread
* [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; 8+ messages in thread
From: Krzysztof Kozlowski @ 2015-12-28 2:01 UTC (permalink / raw)
To: linux-arm-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] 8+ messages in thread
* [PATCH 02/10] spi: cadence, zynq: use to_platform_device()
2015-12-27 13:15 ` [PATCH 02/10] spi: cadence, zynq: " Geliang Tang
@ 2015-12-29 18:01 ` Moritz Fischer
0 siblings, 0 replies; 8+ messages in thread
From: Moritz Fischer @ 2015-12-29 18:01 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Sun, Dec 27, 2015 at 5:15 AM, Geliang Tang <geliangtang@163.com> wrote:
> Use to_platform_device() instead of open-coding it.
>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
Looks good to me, maybe (nit) split it up into two commits.
Cheers,
Moritz
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 04/10] i2c: st: use to_platform_device()
2015-12-27 13:15 ` [PATCH 04/10] i2c: st: " Geliang Tang
@ 2016-01-03 18:55 ` Wolfram Sang
0 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2016-01-03 18:55 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Dec 27, 2015 at 09:15:42PM +0800, Geliang Tang wrote:
> Use to_platform_device() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
Applied to for-next, thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160103/8a2663c9/attachment.sig>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [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; 8+ messages in thread
From: Krzysztof Kozlowski @ 2016-01-25 7:09 UTC (permalink / raw)
To: linux-arm-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] 8+ messages in thread
end of thread, other threads:[~2016-01-25 7:09 UTC | newest]
Thread overview: 8+ 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:15 ` [PATCH 02/10] spi: cadence, zynq: " Geliang Tang
2015-12-29 18:01 ` Moritz Fischer
2015-12-27 13:15 ` [PATCH 04/10] i2c: st: " Geliang Tang
2016-01-03 18:55 ` Wolfram Sang
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;
as well as URLs for NNTP newsgroup(s).