aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYangtao Li <[email protected]>2023-07-07 10:42:23 +0800
committerGreg Kroah-Hartman <[email protected]>2023-08-04 15:38:45 +0200
commit3905841967f89a53cdd1a46a312da6355fcbc25c (patch)
treeaee9b28e073df601bf3d2697f126f3a91bee22b7
parent190d1f226407d4a08e193136e26c1ac967f67b9c (diff)
misc: xilinx_tmr_manager: 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: Yangtao Li <[email protected]> Reviewed-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/misc/xilinx_tmr_manager.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/xilinx_tmr_manager.c b/drivers/misc/xilinx_tmr_manager.c
index 0ef55e06d3a0..2e7a5f37a01f 100644
--- a/drivers/misc/xilinx_tmr_manager.c
+++ b/drivers/misc/xilinx_tmr_manager.c
@@ -170,8 +170,7 @@ static int xtmr_manager_probe(struct platform_device *pdev)
if (!xtmr_manager)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- xtmr_manager->regs = devm_ioremap_resource(&pdev->dev, res);
+ xtmr_manager->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(xtmr_manager->regs))
return PTR_ERR(xtmr_manager->regs);