[PATCH 3/3] misc: xilinx_tmr_manager: Use devm_platform_get_and_ioremap_resource()
Michal Simek
michal.simek at amd.com
Thu Jul 6 23:21:07 PDT 2023
On 7/7/23 04:42, Yangtao Li wrote:
> 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 at vivo.com>
> ---
> drivers/misc/xilinx_tmr_manager.c | 3 +--
> 1 file changed, 1 insertion(+), 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);
>
Reviewed-by: Michal Simek <michal.simek at amd.com>
Thanks,
M
More information about the linux-arm-kernel
mailing list