diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-07 05:42:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-04 16:38:45 +0300 |
commit | 3905841967f89a53cdd1a46a312da6355fcbc25c (patch) | |
tree | aee9b28e073df601bf3d2697f126f3a91bee22b7 /drivers/misc/xilinx_tmr_manager.c | |
parent | 190d1f226407d4a08e193136e26c1ac967f67b9c (diff) | |
download | linux-3905841967f89a53cdd1a46a312da6355fcbc25c.tar.xz |
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 <frank.li@vivo.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20230707024224.78907-3-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/xilinx_tmr_manager.c')
-rw-r--r-- | drivers/misc/xilinx_tmr_manager.c | 3 |
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); |