diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2022-11-10 17:25:28 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-01-18 22:16:47 +0530 |
commit | 4b23603a251d24022f2fa48ee67610eb245a4115 (patch) | |
tree | 86453ac92d58c7e8946f800f8d1bf9d94ee0e12b /drivers/dma/tegra210-adma.c | |
parent | 531d4dfcfd164f575d7b12c784b63c762da1fbf4 (diff) | |
download | lwn-4b23603a251d24022f2fa48ee67610eb245a4115.tar.gz lwn-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/tegra210-adma.c')
-rw-r--r-- | drivers/dma/tegra210-adma.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c index ae39b52012b2..d1a84483f627 100644 --- a/drivers/dma/tegra210-adma.c +++ b/drivers/dma/tegra210-adma.c @@ -837,7 +837,6 @@ static int tegra_adma_probe(struct platform_device *pdev) { const struct tegra_adma_chip_data *cdata; struct tegra_adma *tdma; - struct resource *res; int ret, i; cdata = of_device_get_match_data(&pdev->dev); @@ -857,8 +856,7 @@ static int tegra_adma_probe(struct platform_device *pdev) tdma->nr_channels = cdata->nr_channels; platform_set_drvdata(pdev, tdma); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - tdma->base_addr = devm_ioremap_resource(&pdev->dev, res); + tdma->base_addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(tdma->base_addr)) return PTR_ERR(tdma->base_addr); |