diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2022-11-10 16:25:28 +0100 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-01-18 17:46:47 +0100 |
commit | 4b23603a251d24022f2fa48ee67610eb245a4115 (patch) | |
tree | 86453ac92d58c7e8946f800f8d1bf9d94ee0e12b /drivers/dma/imx-sdma.c | |
parent | dmaengine: at_xdmac: remove empty line (diff) | |
download | linux-4b23603a251d24022f2fa48ee67610eb245a4115.tar.xz linux-4b23603a251d24022f2fa48ee67610eb245a4115.zip |
dmaengine: drivers: Use devm_platform_ioremap_resource()
platform_get_resource() and devm_ioremap_resource() are wrapped up in the
devm_platform_ioremap_resource() helper. Use the helper and get rid of the
local variable for struct resource *. We now have a function call less.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20221110152528.7821-1-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/imx-sdma.c')
-rw-r--r-- | drivers/dma/imx-sdma.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index ab877ceeac3f..97396af129f8 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -2189,7 +2189,6 @@ static int sdma_probe(struct platform_device *pdev) const char *fw_name; int ret; int irq; - struct resource *iores; struct resource spba_res; int i; struct sdma_engine *sdma; @@ -2212,8 +2211,7 @@ static int sdma_probe(struct platform_device *pdev) if (irq < 0) return irq; - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sdma->regs = devm_ioremap_resource(&pdev->dev, iores); + sdma->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sdma->regs)) return PTR_ERR(sdma->regs); |