Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

reset: axs10x: Use devm_platform_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to Use devm_platform_ioremap_resource(), as this is exactly
what this function does.

Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202302161050336958071@zte.com.cn
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Ye Xingchen and committed by
Philipp Zabel
9bf9276f 41ccb3a0

+1 -3
+1 -3
drivers/reset/reset-axs10x.c
··· 44 44 static int axs10x_reset_probe(struct platform_device *pdev) 45 45 { 46 46 struct axs10x_rst *rst; 47 - struct resource *mem; 48 47 49 48 rst = devm_kzalloc(&pdev->dev, sizeof(*rst), GFP_KERNEL); 50 49 if (!rst) 51 50 return -ENOMEM; 52 51 53 - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 54 - rst->regs_rst = devm_ioremap_resource(&pdev->dev, mem); 52 + rst->regs_rst = devm_platform_ioremap_resource(pdev, 0); 55 53 if (IS_ERR(rst->regs_rst)) 56 54 return PTR_ERR(rst->regs_rst); 57 55