lkml.org 
[lkml]   [2016]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/10 v2] dmaengine: ppc4xx: use to_platform_device()
Date
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


\
 
 \ /
  Last update: 2016-01-18 17:21    [W:0.952 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site