diff options
| author | Yangtao Li <[email protected]> | 2023-07-07 02:42:23 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-08-04 13:38:45 +0000 |
| commit | 3905841967f89a53cdd1a46a312da6355fcbc25c (patch) | |
| tree | aee9b28e073df601bf3d2697f126f3a91bee22b7 /drivers/misc/xilinx_tmr_manager.c | |
| parent | misc/xilinx_sdfec: Convert to devm_platform_ioremap_resource() (diff) | |
| download | kernel-3905841967f89a53cdd1a46a312da6355fcbc25c.tar.gz kernel-3905841967f89a53cdd1a46a312da6355fcbc25c.zip | |
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]>
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); |
