提交 a9c56721 编写于 作者: A Andy Shevchenko 提交者: Vinod Koul

dmaengine: dw: platform: Use devm_platform_ioremap_resource()

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20190820131546.75744-7-andriy.shevchenko@linux.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
上级 f8d9ddbc
...@@ -172,7 +172,6 @@ static int dw_probe(struct platform_device *pdev) ...@@ -172,7 +172,6 @@ static int dw_probe(struct platform_device *pdev)
struct dw_dma_chip_pdata *data; struct dw_dma_chip_pdata *data;
struct dw_dma_chip *chip; struct dw_dma_chip *chip;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct resource *mem;
int err; int err;
match = device_get_match_data(dev); match = device_get_match_data(dev);
...@@ -191,8 +190,7 @@ static int dw_probe(struct platform_device *pdev) ...@@ -191,8 +190,7 @@ static int dw_probe(struct platform_device *pdev)
if (chip->irq < 0) if (chip->irq < 0)
return chip->irq; return chip->irq;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); chip->regs = devm_platform_ioremap_resource(pdev, 0);
chip->regs = devm_ioremap_resource(dev, mem);
if (IS_ERR(chip->regs)) if (IS_ERR(chip->regs))
return PTR_ERR(chip->regs); return PTR_ERR(chip->regs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册