diff mbox series

[v1,08/12] dmaengine: dw: platform: Use devm_platform_ioremap_resource()

Message ID 20190806094054.64871-8-andriy.shevchenko@linux.intel.com (mailing list archive)
State Changes Requested
Headers show
Series [v1,01/12] dmaengine: acpi: Set up DMA mask based on CSRT | expand

Commit Message

Andy Shevchenko Aug. 6, 2019, 9:40 a.m. UTC
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/dma/dw/platform.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
index 7e0ec6ef3a1f..45cf47ca922f 100644
--- a/drivers/dma/dw/platform.c
+++ b/drivers/dma/dw/platform.c
@@ -172,7 +172,6 @@  static int dw_probe(struct platform_device *pdev)
 	struct dw_dma_chip_pdata *data;
 	struct dw_dma_chip *chip;
 	struct device *dev = &pdev->dev;
-	struct resource *mem;
 	int err;
 
 	match = device_get_match_data(dev);
@@ -191,8 +190,7 @@  static int dw_probe(struct platform_device *pdev)
 	if (chip->irq < 0)
 		return chip->irq;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	chip->regs = devm_ioremap_resource(dev, mem);
+	chip->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(chip->regs))
 		return PTR_ERR(chip->regs);