All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: use to_platform_device()
@ 2019-05-26  7:13 ` Weitao Hou
  0 siblings, 0 replies; 6+ messages in thread
From: Weitao Hou @ 2019-05-26  7:13 UTC (permalink / raw)
  To: vkoul, dan.j.williams, mcoquelin.stm32, alexandre.torgue
  Cc: dmaengine, linux-stm32, linux-arm-kernel, linux-kernel, Weitao Hou

Use to_platform_device() instead of open-coding it.

Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
---
 drivers/dma/stm32-dmamux.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index a67119199c45..63af24d4c834 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -306,8 +306,7 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
 #ifdef CONFIG_PM
 static int stm32_dmamux_runtime_suspend(struct device *dev)
 {
-	struct platform_device *pdev =
-		container_of(dev, struct platform_device, dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(stm32_dmamux->clk);
@@ -317,8 +316,7 @@ static int stm32_dmamux_runtime_suspend(struct device *dev)
 
 static int stm32_dmamux_runtime_resume(struct device *dev)
 {
-	struct platform_device *pdev =
-		container_of(dev, struct platform_device, dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
 	int ret;
 
-- 
2.18.0


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

* [PATCH] dmaengine: use to_platform_device()
@ 2019-05-26  7:13 ` Weitao Hou
  0 siblings, 0 replies; 6+ messages in thread
From: Weitao Hou @ 2019-05-26  7:13 UTC (permalink / raw)
  To: vkoul, dan.j.williams, mcoquelin.stm32, alexandre.torgue
  Cc: dmaengine, Weitao Hou, linux-stm32, linux-arm-kernel, linux-kernel

Use to_platform_device() instead of open-coding it.

Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
---
 drivers/dma/stm32-dmamux.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index a67119199c45..63af24d4c834 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -306,8 +306,7 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
 #ifdef CONFIG_PM
 static int stm32_dmamux_runtime_suspend(struct device *dev)
 {
-	struct platform_device *pdev =
-		container_of(dev, struct platform_device, dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(stm32_dmamux->clk);
@@ -317,8 +316,7 @@ static int stm32_dmamux_runtime_suspend(struct device *dev)
 
 static int stm32_dmamux_runtime_resume(struct device *dev)
 {
-	struct platform_device *pdev =
-		container_of(dev, struct platform_device, dev);
+	struct platform_device *pdev = to_platform_device(dev);
 	struct stm32_dmamux_data *stm32_dmamux = platform_get_drvdata(pdev);
 	int ret;
 
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dmaengine: use to_platform_device()
  2019-05-26  7:13 ` Weitao Hou
@ 2019-05-27  6:43   ` Vinod Koul
  -1 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2019-05-27  6:43 UTC (permalink / raw)
  To: Weitao Hou
  Cc: dan.j.williams, mcoquelin.stm32, alexandre.torgue, dmaengine,
	linux-stm32, linux-arm-kernel, linux-kernel

On 26-05-19, 15:13, Weitao Hou wrote:
> Use to_platform_device() instead of open-coding it.

Applied after adding stm32 driver tag, thanks

-- 
~Vinod

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

* Re: [PATCH] dmaengine: use to_platform_device()
@ 2019-05-27  6:43   ` Vinod Koul
  0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2019-05-27  6:43 UTC (permalink / raw)
  To: Weitao Hou
  Cc: alexandre.torgue, linux-kernel, mcoquelin.stm32, dmaengine,
	dan.j.williams, linux-stm32, linux-arm-kernel

On 26-05-19, 15:13, Weitao Hou wrote:
> Use to_platform_device() instead of open-coding it.

Applied after adding stm32 driver tag, thanks

-- 
~Vinod

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dmaengine: use to_platform_device()
       [not found]   ` <CAK98mP9teTxZn9mMZ_yXSmC7h8gimgN14kX=GT0Q43O58zC-rw@mail.gmail.com>
@ 2019-05-27 13:27       ` Vinod Koul
  0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2019-05-27 13:27 UTC (permalink / raw)
  To: Weitao Hou
  Cc: dan.j.williams, mcoquelin.stm32, alexandre.torgue, dmaengine,
	linux-stm32, linux-arm-kernel, linux-kernel

Hi Weitao,

On 27-05-19, 21:10, Weitao Hou wrote:
> Hi,Vinod
>     Need I add the stm32 driver tag and resend v2 patch?

Please do not top post!

As below says, the patch is applied and I corrected the tag and added
stm32 while applying, so no change or v2 required.

> Vinod Koul <vkoul@kernel.org> 于2019年5月27日周一 下午2:43写道:
> 
> > On 26-05-19, 15:13, Weitao Hou wrote:
> > > Use to_platform_device() instead of open-coding it.
> >
> > Applied after adding stm32 driver tag, thanks
> >
> > --
> > ~Vinod
> >

-- 
~Vinod

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

* Re: [PATCH] dmaengine: use to_platform_device()
@ 2019-05-27 13:27       ` Vinod Koul
  0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2019-05-27 13:27 UTC (permalink / raw)
  To: Weitao Hou
  Cc: alexandre.torgue, linux-kernel, mcoquelin.stm32, dmaengine,
	dan.j.williams, linux-stm32, linux-arm-kernel

Hi Weitao,

On 27-05-19, 21:10, Weitao Hou wrote:
> Hi,Vinod
>     Need I add the stm32 driver tag and resend v2 patch?

Please do not top post!

As below says, the patch is applied and I corrected the tag and added
stm32 while applying, so no change or v2 required.

> Vinod Koul <vkoul@kernel.org> 于2019年5月27日周一 下午2:43写道:
> 
> > On 26-05-19, 15:13, Weitao Hou wrote:
> > > Use to_platform_device() instead of open-coding it.
> >
> > Applied after adding stm32 driver tag, thanks
> >
> > --
> > ~Vinod
> >

-- 
~Vinod

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-05-27 13:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-26  7:13 [PATCH] dmaengine: use to_platform_device() Weitao Hou
2019-05-26  7:13 ` Weitao Hou
2019-05-27  6:43 ` Vinod Koul
2019-05-27  6:43   ` Vinod Koul
     [not found]   ` <CAK98mP9teTxZn9mMZ_yXSmC7h8gimgN14kX=GT0Q43O58zC-rw@mail.gmail.com>
2019-05-27 13:27     ` Vinod Koul
2019-05-27 13:27       ` Vinod Koul

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.