summaryrefslogtreecommitdiff
path: root/arch/mips/lantiq/xway/dma.c
diff options
context:
space:
mode:
authorYe Xingchen <ye.xingchen@zte.com.cn>2023-02-08 10:45:16 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2023-02-09 13:03:33 +0100
commit00c11b40e6b1e36d671fccc1bd82d1dfdfd2605e (patch)
tree46ce299ba47a0743893e97a56e848f2a242fc521 /arch/mips/lantiq/xway/dma.c
parentfc605b914167de75432c3b5aae239fb191e84a31 (diff)
MIPS: lantiq: xway: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/lantiq/xway/dma.c')
-rw-r--r--arch/mips/lantiq/xway/dma.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c
index f8eedeb15f18..934ac72937e5 100644
--- a/arch/mips/lantiq/xway/dma.c
+++ b/arch/mips/lantiq/xway/dma.c
@@ -239,12 +239,10 @@ static int
ltq_dma_init(struct platform_device *pdev)
{
struct clk *clk;
- struct resource *res;
unsigned int id, nchannels;
int i;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ltq_dma_membase = devm_ioremap_resource(&pdev->dev, res);
+ ltq_dma_membase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(ltq_dma_membase))
panic("Failed to remap dma resource");