All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] PM / devfreq: exynos: use to_platform_device()
@ 2015-12-27 13:15 ` Geliang Tang
  0 siblings, 0 replies; 43+ 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] 43+ messages in thread

* [PATCH 01/10] PM / devfreq: exynos: use to_platform_device()
@ 2015-12-27 13:15 ` Geliang Tang
  0 siblings, 0 replies; 43+ 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] 43+ messages in thread

* [PATCH 02/10] spi: cadence, zynq: use to_platform_device()
  2015-12-27 13:15 ` Geliang Tang
  (?)
@ 2015-12-27 13:15   ` Geliang Tang
  -1 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
  To: Mark Brown, Michal Simek, Sören Brinkmann
  Cc: Geliang Tang, linux-spi, linux-kernel, 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] 43+ messages in thread

* [PATCH 02/10] spi: cadence, zynq: use to_platform_device()
@ 2015-12-27 13:15   ` Geliang Tang
  0 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
  To: Mark Brown, Michal Simek, Sören Brinkmann
  Cc: Geliang Tang, linux-kernel, linux-arm-kernel, linux-spi

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] 43+ messages in thread

* [PATCH 02/10] spi: cadence, zynq: use to_platform_device()
@ 2015-12-27 13:15   ` Geliang Tang
  0 siblings, 0 replies; 43+ 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] 43+ messages in thread

* [PATCH 03/10] dmaengine: ppc4xx: use to_platform_device()
  2015-12-27 13:15 ` Geliang Tang
  (?)
  (?)
@ 2015-12-27 13:15 ` Geliang Tang
  2016-01-06  9:22   ` Vinod Koul
  -1 siblings, 1 reply; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
  To: Dan Williams, Vinod Koul, Jarkko Nikula
  Cc: Geliang Tang, dmaengine, linux-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/dma/ppc4xx/adma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index 9217f89..039803a 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -3887,7 +3887,7 @@ static int ppc440spe_adma_setup_irqs(struct ppc440spe_adma_device *adev,
 	struct device_node *np;
 	int ret;
 
-	ofdev = container_of(adev->dev, struct platform_device, dev);
+	ofdev = to_platform_device(adev->dev);
 	np = ofdev->dev.of_node;
 	if (adev->id != PPC440SPE_XOR_ID) {
 		adev->err_irq = irq_of_parse_and_map(np, 1);
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 04/10] i2c: st: use to_platform_device()
  2015-12-27 13:15 ` Geliang Tang
  (?)
@ 2015-12-27 13:15   ` Geliang Tang
  -1 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
  To: Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard, Wolfram Sang
  Cc: Geliang Tang, linux-arm-kernel, kernel, linux-i2c, linux-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] 43+ messages in thread

* [PATCH 04/10] i2c: st: use to_platform_device()
@ 2015-12-27 13:15   ` Geliang Tang
  0 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
  To: Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard, Wolfram Sang
  Cc: Geliang Tang, linux-kernel, kernel, linux-arm-kernel, linux-i2c

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] 43+ messages in thread

* [PATCH 04/10] i2c: st: use to_platform_device()
@ 2015-12-27 13:15   ` Geliang Tang
  0 siblings, 0 replies; 43+ 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] 43+ messages in thread

* [PATCH 05/10] mmc: cb710: use to_platform_device()
  2015-12-27 13:15 ` Geliang Tang
                   ` (3 preceding siblings ...)
  (?)
@ 2015-12-27 13:15 ` Geliang Tang
  2015-12-28 13:29   ` Ulf Hansson
  -1 siblings, 1 reply; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
  To: Michał Mirosław, Ulf Hansson
  Cc: Geliang Tang, linux-mmc, linux-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/mmc/host/cb710-mmc.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mmc/host/cb710-mmc.h b/drivers/mmc/host/cb710-mmc.h
index 8984ec8..8ecd9e5 100644
--- a/drivers/mmc/host/cb710-mmc.h
+++ b/drivers/mmc/host/cb710-mmc.h
@@ -29,8 +29,7 @@ static inline struct mmc_host *cb710_slot_to_mmc(struct cb710_slot *slot)
 
 static inline struct cb710_slot *cb710_mmc_to_slot(struct mmc_host *mmc)
 {
-	struct platform_device *pdev = container_of(mmc_dev(mmc),
-		struct platform_device, dev);
+	struct platform_device *pdev = to_platform_device(mmc_dev(mmc));
 	return cb710_pdev_to_slot(pdev);
 }
 
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 06/10] net: hns: use to_platform_device()
  2015-12-27 13:15 ` Geliang Tang
                   ` (4 preceding siblings ...)
  (?)
@ 2015-12-27 13:15 ` Geliang Tang
  2015-12-27 13:23   ` Andy Shevchenko
  2015-12-29 20:47   ` David Miller
  -1 siblings, 2 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
  To: David S. Miller, Yisen Zhuang, yankejian, huangdaode
  Cc: Geliang Tang, netdev, linux-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
index 8c30cec..d2263c7 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
@@ -499,8 +499,7 @@ void hns_rcb_get_cfg(struct rcb_common_cb *rcb_common)
 	int base_irq_idx = hns_rcb_get_base_irq_idx(rcb_common);
 	struct device_node *np = rcb_common->dsaf_dev->dev->of_node;
 	struct platform_device *pdev =
-		container_of(rcb_common->dsaf_dev->dev,
-			     struct platform_device, dev);
+		to_platform_device(rcb_common->dsaf_dev->dev);
 	bool is_ver1 = AE_IS_VER1(rcb_common->dsaf_dev->dsaf_ver);
 
 	for (i = 0; i < ring_num; i++) {
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 07/10] platform/chrome: use to_platform_device()
  2015-12-27 13:15 ` Geliang Tang
                   ` (5 preceding siblings ...)
  (?)
@ 2015-12-27 13:15 ` Geliang Tang
  2016-03-06 22:15   ` Olof Johansson
  -1 siblings, 1 reply; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
  To: Olof Johansson; +Cc: Geliang Tang, linux-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/platform/chrome/cros_ec_lightbar.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
index ff76405..a79fb86 100644
--- a/drivers/platform/chrome/cros_ec_lightbar.c
+++ b/drivers/platform/chrome/cros_ec_lightbar.c
@@ -412,8 +412,7 @@ static umode_t cros_ec_lightbar_attrs_are_visible(struct kobject *kobj,
 	struct device *dev = container_of(kobj, struct device, kobj);
 	struct cros_ec_dev *ec = container_of(dev,
 					      struct cros_ec_dev, class_dev);
-	struct platform_device *pdev = container_of(ec->dev,
-						   struct platform_device, dev);
+	struct platform_device *pdev = to_platform_device(ec->dev);
 	if (pdev->id != 0)
 		return 0;
 
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 08/10] staging: fbtft: use to_platform_device()
  2015-12-27 13:15 ` Geliang Tang
                   ` (6 preceding siblings ...)
  (?)
@ 2015-12-27 13:15 ` Geliang Tang
  -1 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
  To: Thomas Petazzoni, Noralf Trønnes, Greg Kroah-Hartman
  Cc: Geliang Tang, devel, linux-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/staging/fbtft/fbtft_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c
index 071f79b..50d5735 100644
--- a/drivers/staging/fbtft/fbtft_device.c
+++ b/drivers/staging/fbtft/fbtft_device.c
@@ -1305,7 +1305,7 @@ static void pr_spi_devices(void)
 static int p_device_found(struct device *dev, void *data)
 {
 	struct platform_device
-	*pdev = container_of(dev, struct platform_device, dev);
+	*pdev = to_platform_device(dev);
 
 	if (strstr(pdev->name, "fb"))
 		dev_info(dev, "%s id=%d pdata? %s\n", pdev->name, pdev->id,
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 09/10] watchdog: cadence_wdt: use to_platform_device()
  2015-12-27 13:15 ` Geliang Tang
                   ` (7 preceding siblings ...)
  (?)
@ 2015-12-27 13:15 ` Geliang Tang
  2015-12-27 15:27   ` Guenter Roeck
  2015-12-27 20:17   ` Wim Van Sebroeck
  -1 siblings, 2 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Geliang Tang, linux-watchdog, linux-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/watchdog/cadence_wdt.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c
index abf64eb..4dda902 100644
--- a/drivers/watchdog/cadence_wdt.c
+++ b/drivers/watchdog/cadence_wdt.c
@@ -421,8 +421,7 @@ static void cdns_wdt_shutdown(struct platform_device *pdev)
  */
 static int __maybe_unused cdns_wdt_suspend(struct device *dev)
 {
-	struct platform_device *pdev = container_of(dev,
-			struct platform_device, dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct cdns_wdt *wdt = platform_get_drvdata(pdev);
 
 	cdns_wdt_stop(&wdt->cdns_wdt_device);
@@ -440,8 +439,7 @@ static int __maybe_unused cdns_wdt_suspend(struct device *dev)
 static int __maybe_unused cdns_wdt_resume(struct device *dev)
 {
 	int ret;
-	struct platform_device *pdev = container_of(dev,
-			struct platform_device, dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct cdns_wdt *wdt = platform_get_drvdata(pdev);
 
 	ret = clk_prepare_enable(wdt->clk);
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 10/10] ARM: plat-samsung: use to_platform_device()
  2015-12-27 13:15 ` Geliang Tang
@ 2015-12-27 13:17   ` Geliang Tang
  -1 siblings, 0 replies; 43+ 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] 43+ messages in thread

* [PATCH 10/10] ARM: plat-samsung: use to_platform_device()
@ 2015-12-27 13:17   ` Geliang Tang
  0 siblings, 0 replies; 43+ 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] 43+ messages in thread

* Re: [PATCH 06/10] net: hns: use to_platform_device()
  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
  1 sibling, 1 reply; 43+ messages in thread
From: Andy Shevchenko @ 2015-12-27 13:23 UTC (permalink / raw)
  To: Geliang Tang
  Cc: David S. Miller, Yisen Zhuang, yankejian, huangdaode, netdev,
	linux-kernel

On Sun, Dec 27, 2015 at 3:15 PM, Geliang Tang <geliangtang@163.com> wrote:
> Use to_platform_device() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
>  drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
> index 8c30cec..d2263c7 100644
> --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
> @@ -499,8 +499,7 @@ void hns_rcb_get_cfg(struct rcb_common_cb *rcb_common)
>         int base_irq_idx = hns_rcb_get_base_irq_idx(rcb_common);
>         struct device_node *np = rcb_common->dsaf_dev->dev->of_node;
>         struct platform_device *pdev =
> -               container_of(rcb_common->dsaf_dev->dev,
> -                            struct platform_device, dev);
> +               to_platform_device(rcb_common->dsaf_dev->dev);

Can it be one line after all? Please, check this for all your patches
of such kind.

>         bool is_ver1 = AE_IS_VER1(rcb_common->dsaf_dev->dsaf_ver);
>
>         for (i = 0; i < ring_num; i++) {
> --
> 2.5.0
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 09/10] watchdog: cadence_wdt: use to_platform_device()
  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
  1 sibling, 0 replies; 43+ messages in thread
From: Guenter Roeck @ 2015-12-27 15:27 UTC (permalink / raw)
  To: Geliang Tang; +Cc: Wim Van Sebroeck, linux-watchdog, linux-kernel

On Sun, Dec 27, 2015 at 09:15:47PM +0800, Geliang Tang wrote:
> Use to_platform_device() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/cadence_wdt.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c
> index abf64eb..4dda902 100644
> --- a/drivers/watchdog/cadence_wdt.c
> +++ b/drivers/watchdog/cadence_wdt.c
> @@ -421,8 +421,7 @@ static void cdns_wdt_shutdown(struct platform_device *pdev)
>   */
>  static int __maybe_unused cdns_wdt_suspend(struct device *dev)
>  {
> -	struct platform_device *pdev = container_of(dev,
> -			struct platform_device, dev);
> +	struct platform_device *pdev = to_platform_device(dev);
>  	struct cdns_wdt *wdt = platform_get_drvdata(pdev);
>  
>  	cdns_wdt_stop(&wdt->cdns_wdt_device);
> @@ -440,8 +439,7 @@ static int __maybe_unused cdns_wdt_suspend(struct device *dev)
>  static int __maybe_unused cdns_wdt_resume(struct device *dev)
>  {
>  	int ret;
> -	struct platform_device *pdev = container_of(dev,
> -			struct platform_device, dev);
> +	struct platform_device *pdev = to_platform_device(dev);
>  	struct cdns_wdt *wdt = platform_get_drvdata(pdev);
>  
>  	ret = clk_prepare_enable(wdt->clk);
> -- 
> 2.5.0
> 
> 

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 06/10] net: hns: use to_platform_device()
  2015-12-27 13:23   ` Andy Shevchenko
@ 2015-12-27 17:03     ` Geliang Tang
  0 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-27 17:03 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: David S. Miller, Yisen Zhuang, yankejian, huangdaode, netdev,
	linux-kernel

On Sun, Dec 27, 2015 at 03:23:30PM +0200, Andy Shevchenko wrote:
> On Sun, Dec 27, 2015 at 3:15 PM, Geliang Tang <geliangtang@163.com> wrote:
> > Use to_platform_device() instead of open-coding it.
> >
> > Signed-off-by: Geliang Tang <geliangtang@163.com>
> > ---
> >  drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
> > index 8c30cec..d2263c7 100644
> > --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
> > +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
> > @@ -499,8 +499,7 @@ void hns_rcb_get_cfg(struct rcb_common_cb *rcb_common)
> >         int base_irq_idx = hns_rcb_get_base_irq_idx(rcb_common);
> >         struct device_node *np = rcb_common->dsaf_dev->dev->of_node;
> >         struct platform_device *pdev =
> > -               container_of(rcb_common->dsaf_dev->dev,
> > -                            struct platform_device, dev);
> > +               to_platform_device(rcb_common->dsaf_dev->dev);
> 
> Can it be one line after all? Please, check this for all your patches
> of such kind.
> 

Thanks for your review.

It's over 80 characters in one line:

 WARNING: line over 80 characters
 #22: FILE: drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c:501:
 +	struct platform_device *pdev = to_platform_device(rcb_common->dsaf_dev->dev);

 total: 0 errors, 1 warnings, 0 checks, 10 lines checked

	Geliang


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 09/10] watchdog: cadence_wdt: use to_platform_device()
  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
  1 sibling, 0 replies; 43+ messages in thread
From: Wim Van Sebroeck @ 2015-12-27 20:17 UTC (permalink / raw)
  To: Geliang Tang; +Cc: Guenter Roeck, linux-watchdog, linux-kernel

Hi Geliang,

> Use to_platform_device() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
>  drivers/watchdog/cadence_wdt.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c
> index abf64eb..4dda902 100644
> --- a/drivers/watchdog/cadence_wdt.c
> +++ b/drivers/watchdog/cadence_wdt.c
> @@ -421,8 +421,7 @@ static void cdns_wdt_shutdown(struct platform_device *pdev)
>   */
>  static int __maybe_unused cdns_wdt_suspend(struct device *dev)
>  {
> -	struct platform_device *pdev = container_of(dev,
> -			struct platform_device, dev);
> +	struct platform_device *pdev = to_platform_device(dev);
>  	struct cdns_wdt *wdt = platform_get_drvdata(pdev);
>  
>  	cdns_wdt_stop(&wdt->cdns_wdt_device);
> @@ -440,8 +439,7 @@ static int __maybe_unused cdns_wdt_suspend(struct device *dev)
>  static int __maybe_unused cdns_wdt_resume(struct device *dev)
>  {
>  	int ret;
> -	struct platform_device *pdev = container_of(dev,
> -			struct platform_device, dev);
> +	struct platform_device *pdev = to_platform_device(dev);
>  	struct cdns_wdt *wdt = platform_get_drvdata(pdev);
>  
>  	ret = clk_prepare_enable(wdt->clk);
> -- 
> 2.5.0
> 
> 

Patch added to linux-watchdog-next.

Kind regards,
Wim.


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 10/10] ARM: plat-samsung: use to_platform_device()
  2015-12-27 13:17   ` Geliang Tang
@ 2015-12-28  2:01     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 43+ 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] 43+ messages in thread

* [PATCH 10/10] ARM: plat-samsung: use to_platform_device()
@ 2015-12-28  2:01     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 43+ 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] 43+ messages in thread

* Re: [PATCH 05/10] mmc: cb710: use to_platform_device()
  2015-12-27 13:15 ` [PATCH 05/10] mmc: cb710: " Geliang Tang
@ 2015-12-28 13:29   ` Ulf Hansson
  0 siblings, 0 replies; 43+ messages in thread
From: Ulf Hansson @ 2015-12-28 13:29 UTC (permalink / raw)
  To: Geliang Tang; +Cc: Michał Mirosław, linux-mmc, linux-kernel

On 27 December 2015 at 14:15, Geliang Tang <geliangtang@163.com> wrote:
> Use to_platform_device() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/cb710-mmc.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/cb710-mmc.h b/drivers/mmc/host/cb710-mmc.h
> index 8984ec8..8ecd9e5 100644
> --- a/drivers/mmc/host/cb710-mmc.h
> +++ b/drivers/mmc/host/cb710-mmc.h
> @@ -29,8 +29,7 @@ static inline struct mmc_host *cb710_slot_to_mmc(struct cb710_slot *slot)
>
>  static inline struct cb710_slot *cb710_mmc_to_slot(struct mmc_host *mmc)
>  {
> -       struct platform_device *pdev = container_of(mmc_dev(mmc),
> -               struct platform_device, dev);
> +       struct platform_device *pdev = to_platform_device(mmc_dev(mmc));
>         return cb710_pdev_to_slot(pdev);
>  }
>
> --
> 2.5.0
>
>

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 02/10] spi: cadence, zynq: use to_platform_device()
@ 2015-12-29 18:01     ` Moritz Fischer
  0 siblings, 0 replies; 43+ messages in thread
From: Moritz Fischer @ 2015-12-29 18:01 UTC (permalink / raw)
  To: Geliang Tang
  Cc: Mark Brown, Michal Simek, Sören Brinkmann,
	Linux Kernel Mailing List, linux-arm-kernel, linux-spi

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] 43+ messages in thread

* Re: [PATCH 02/10] spi: cadence, zynq: use to_platform_device()
@ 2015-12-29 18:01     ` Moritz Fischer
  0 siblings, 0 replies; 43+ messages in thread
From: Moritz Fischer @ 2015-12-29 18:01 UTC (permalink / raw)
  To: Geliang Tang
  Cc: Mark Brown, Michal Simek, Sören Brinkmann,
	Linux Kernel Mailing List, linux-arm-kernel,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

Hi,

On Sun, Dec 27, 2015 at 5:15 AM, Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org> wrote:
> Use to_platform_device() instead of open-coding it.
>
Reviewed-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org>

Looks good to me, maybe (nit) split it up into two commits.

Cheers,

Moritz
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 02/10] spi: cadence, zynq: use to_platform_device()
@ 2015-12-29 18:01     ` Moritz Fischer
  0 siblings, 0 replies; 43+ 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] 43+ messages in thread

* Re: [PATCH 06/10] net: hns: use to_platform_device()
  2015-12-27 13:15 ` [PATCH 06/10] net: hns: " Geliang Tang
  2015-12-27 13:23   ` Andy Shevchenko
@ 2015-12-29 20:47   ` David Miller
  1 sibling, 0 replies; 43+ messages in thread
From: David Miller @ 2015-12-29 20:47 UTC (permalink / raw)
  To: geliangtang; +Cc: yisen.zhuang, yankejian, huangdaode, netdev, linux-kernel

From: Geliang Tang <geliangtang@163.com>
Date: Sun, 27 Dec 2015 21:15:44 +0800

> Use to_platform_device() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Applied.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 1/2] spi: cadence: use to_platform_device()
@ 2015-12-30 14:57       ` Geliang Tang
  0 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-30 14:57 UTC (permalink / raw)
  To: Mark Brown, Moritz Fischer; +Cc: Geliang Tang, linux-spi, linux-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
---
 drivers/spi/spi-cadence.c | 6 ++----
 1 file changed, 2 insertions(+), 4 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;
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 1/2] spi: cadence: use to_platform_device()
@ 2015-12-30 14:57       ` Geliang Tang
  0 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-30 14:57 UTC (permalink / raw)
  To: Mark Brown, Moritz Fischer
  Cc: Geliang Tang, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org>
Reviewed-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
---
 drivers/spi/spi-cadence.c | 6 ++----
 1 file changed, 2 insertions(+), 4 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;
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 2/2] spi: zynq: use to_platform_device()
       [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-30 14:57         ` Geliang Tang
  0 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-30 14:57 UTC (permalink / raw)
  To: Mark Brown, Michal Simek, Sören Brinkmann, Moritz Fischer
  Cc: Geliang Tang, linux-spi, linux-arm-kernel, linux-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
---
 drivers/spi/spi-zynqmp-gqspi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

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] 43+ messages in thread

* [PATCH 2/2] spi: zynq: use to_platform_device()
@ 2015-12-30 14:57         ` Geliang Tang
  0 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-30 14:57 UTC (permalink / raw)
  To: Mark Brown, Michal Simek, Sören Brinkmann, Moritz Fischer
  Cc: Geliang Tang, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org>
Reviewed-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
---
 drivers/spi/spi-zynqmp-gqspi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

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


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 2/2] spi: zynq: use to_platform_device()
@ 2015-12-30 14:57         ` Geliang Tang
  0 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2015-12-30 14:57 UTC (permalink / raw)
  To: linux-arm-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
---
 drivers/spi/spi-zynqmp-gqspi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

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] 43+ messages in thread

* Re: [PATCH 1/2] spi: cadence: use to_platform_device()
       [not found]       ` <eba9c4fde1cf48cc56afba6275a4efdda998cbbe.1451485340.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
@ 2015-12-30 17:02         ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2015-12-30 17:02 UTC (permalink / raw)
  To: Geliang Tang; +Cc: Moritz Fischer, linux-spi, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

On Wed, Dec 30, 2015 at 10:57:35PM +0800, Geliang Tang wrote:
> Use to_platform_device() instead of open-coding it.

Please don't send new patches in reply to the middle of other serieses,
it gets confusing working out what the currently propose series is.
Send new patches as new patches.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 1/2] spi: cadence: use to_platform_device()
@ 2015-12-30 17:02         ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2015-12-30 17:02 UTC (permalink / raw)
  To: Geliang Tang
  Cc: Moritz Fischer, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

On Wed, Dec 30, 2015 at 10:57:35PM +0800, Geliang Tang wrote:
> Use to_platform_device() instead of open-coding it.

Please don't send new patches in reply to the middle of other serieses,
it gets confusing working out what the currently propose series is.
Send new patches as new patches.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 04/10] i2c: st: use to_platform_device()
  2015-12-27 13:15   ` Geliang Tang
@ 2016-01-03 18:55     ` Wolfram Sang
  -1 siblings, 0 replies; 43+ messages in thread
From: Wolfram Sang @ 2016-01-03 18:55 UTC (permalink / raw)
  To: Geliang Tang
  Cc: Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard,
	linux-arm-kernel, kernel, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

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!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 04/10] i2c: st: use to_platform_device()
@ 2016-01-03 18:55     ` Wolfram Sang
  0 siblings, 0 replies; 43+ 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] 43+ messages in thread

* Applied "spi: zynq: use to_platform_device()" to the spi tree
       [not found]         ` <917c5adcc61a2a9e6390c0fe54445aa7c8642462.1451485340.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
@ 2016-01-05 12:33           ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2016-01-05 12:33 UTC (permalink / raw)
  To: Geliang Tang, Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA

The patch

   spi: zynq: use to_platform_device()

has been applied to the spi tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 9d0c1c3332b49570454bb11e55d3c6c7993163da Mon Sep 17 00:00:00 2001
From: Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org>
Date: Fri, 1 Jan 2016 20:29:00 +0800
Subject: [PATCH] spi: zynq: use to_platform_device()

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org>
Reviewed-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/spi/spi-zynqmp-gqspi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index f23f36ebaf3d..aab9b492c627 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.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* Applied "spi: cadence: use to_platform_device()" to the spi tree
       [not found]       ` <eba9c4fde1cf48cc56afba6275a4efdda998cbbe.1451485340.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
@ 2016-01-05 12:33         ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2016-01-05 12:33 UTC (permalink / raw)
  To: Geliang Tang, Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA

The patch

   spi: cadence: use to_platform_device()

has been applied to the spi tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 9033a5f9ac83538502a2bddc62311b09d966799e Mon Sep 17 00:00:00 2001
From: Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org>
Date: Fri, 1 Jan 2016 20:28:59 +0800
Subject: [PATCH] spi: cadence: use to_platform_device()

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org>
Reviewed-by: Moritz Fischer <moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/spi/spi-cadence.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index 5a6749881ff9..121a4135b540 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;
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* Re: [PATCH 03/10] dmaengine: ppc4xx: use to_platform_device()
  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
  0 siblings, 1 reply; 43+ messages in thread
From: Vinod Koul @ 2016-01-06  9:22 UTC (permalink / raw)
  To: Geliang Tang; +Cc: Dan Williams, Jarkko Nikula, dmaengine, linux-kernel

On Sun, Dec 27, 2015 at 09:15:41PM +0800, Geliang Tang wrote:
> Use to_platform_device() instead of open-coding it.
> 

Are these patches thru subystems trees or something else. Also either no
cover-letter or not enough ppl cc'ed on that!

> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
>  drivers/dma/ppc4xx/adma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
> index 9217f89..039803a 100644
> --- a/drivers/dma/ppc4xx/adma.c
> +++ b/drivers/dma/ppc4xx/adma.c
> @@ -3887,7 +3887,7 @@ static int ppc440spe_adma_setup_irqs(struct ppc440spe_adma_device *adev,
>  	struct device_node *np;
>  	int ret;
>  
> -	ofdev = container_of(adev->dev, struct platform_device, dev);
> +	ofdev = to_platform_device(adev->dev);
>  	np = ofdev->dev.of_node;
>  	if (adev->id != PPC440SPE_XOR_ID) {
>  		adev->err_irq = irq_of_parse_and_map(np, 1);
> -- 
> 2.5.0
> 
> 

-- 
~Vinod

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 03/10 v2] dmaengine: ppc4xx: use to_platform_device()
  2016-01-06  9:22   ` Vinod Koul
@ 2016-01-18 16:02     ` Geliang Tang
  0 siblings, 0 replies; 43+ messages in thread
From: Geliang Tang @ 2016-01-18 16:02 UTC (permalink / raw)
  To: Dan Williams, Vinod Koul, Jarkko Nikula
  Cc: Geliang Tang, dmaengine, linux-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
Changes in v2:
 - add the 'Cc:' list.
---
 drivers/dma/ppc4xx/adma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index 9217f89..039803a 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -3887,7 +3887,7 @@ static int ppc440spe_adma_setup_irqs(struct ppc440spe_adma_device *adev,
 	struct device_node *np;
 	int ret;
 
-	ofdev = container_of(adev->dev, struct platform_device, dev);
+	ofdev = to_platform_device(adev->dev);
 	np = ofdev->dev.of_node;
 	if (adev->id != PPC440SPE_XOR_ID) {
 		adev->err_irq = irq_of_parse_and_map(np, 1);
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 43+ 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
  -1 siblings, 0 replies; 43+ 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] 43+ messages in thread

* [PATCH 10/10] ARM: plat-samsung: use to_platform_device()
@ 2016-01-25  7:09       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 43+ 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] 43+ messages in thread

* Re: [PATCH 07/10] platform/chrome: use to_platform_device()
  2015-12-27 13:15 ` [PATCH 07/10] platform/chrome: " Geliang Tang
@ 2016-03-06 22:15   ` Olof Johansson
  0 siblings, 0 replies; 43+ messages in thread
From: Olof Johansson @ 2016-03-06 22:15 UTC (permalink / raw)
  To: Geliang Tang; +Cc: linux-kernel

On Sun, Dec 27, 2015 at 09:15:45PM +0800, Geliang Tang wrote:
> Use to_platform_device() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Applied, thanks.


-Olof

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2016-03-09 22:19 UTC | newest]

Thread overview: 43+ 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 ` 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

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.