diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2022-11-10 18:25:28 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-01-18 19:46:47 +0300 |
commit | 4b23603a251d24022f2fa48ee67610eb245a4115 (patch) | |
tree | 86453ac92d58c7e8946f800f8d1bf9d94ee0e12b /drivers/dma/pxa_dma.c | |
parent | 531d4dfcfd164f575d7b12c784b63c762da1fbf4 (diff) | |
download | linux-4b23603a251d24022f2fa48ee67610eb245a4115.tar.xz |
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/pxa_dma.c')
-rw-r--r-- | drivers/dma/pxa_dma.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c index 22a392fe6d32..1b046d9a3a26 100644 --- a/drivers/dma/pxa_dma.c +++ b/drivers/dma/pxa_dma.c @@ -1346,7 +1346,6 @@ static int pxad_probe(struct platform_device *op) const struct of_device_id *of_id; const struct dma_slave_map *slave_map = NULL; struct mmp_dma_platdata *pdata = dev_get_platdata(&op->dev); - struct resource *iores; int ret, dma_channels = 0, nb_requestors = 0, slave_map_cnt = 0; const enum dma_slave_buswidth widths = DMA_SLAVE_BUSWIDTH_1_BYTE | DMA_SLAVE_BUSWIDTH_2_BYTES | @@ -1358,8 +1357,7 @@ static int pxad_probe(struct platform_device *op) spin_lock_init(&pdev->phy_lock); - iores = platform_get_resource(op, IORESOURCE_MEM, 0); - pdev->base = devm_ioremap_resource(&op->dev, iores); + pdev->base = devm_platform_ioremap_resource(op, 0); if (IS_ERR(pdev->base)) return PTR_ERR(pdev->base); |