summaryrefslogtreecommitdiff
path: root/arch/mips/lantiq/xway/dcdc.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/dcdc.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/dcdc.c')
-rw-r--r--arch/mips/lantiq/xway/dcdc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/mips/lantiq/xway/dcdc.c b/arch/mips/lantiq/xway/dcdc.c
index 4960bee0a99d..96199966a350 100644
--- a/arch/mips/lantiq/xway/dcdc.c
+++ b/arch/mips/lantiq/xway/dcdc.c
@@ -22,10 +22,7 @@ static void __iomem *dcdc_membase;
static int dcdc_probe(struct platform_device *pdev)
{
- struct resource *res;
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dcdc_membase = devm_ioremap_resource(&pdev->dev, res);
+ dcdc_membase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(dcdc_membase))
return PTR_ERR(dcdc_membase);