diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-04 21:03:03 +0800 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2023-07-19 23:28:58 +0200 |
commit | 0b64a0e53cc7875c2410b26a20c1269d72cd1428 (patch) | |
tree | 20c0fa1c2c66c207cdbde41df90f7ac7db8faee8 /drivers/power | |
parent | d40befed9a581740f6ceb0e5998ec2f59bfbc559 (diff) |
power: reset: at91-poweroff: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/reset/at91-poweroff.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/power/reset/at91-poweroff.c b/drivers/power/reset/at91-poweroff.c index 9e74e131c675..dd5399785b69 100644 --- a/drivers/power/reset/at91-poweroff.c +++ b/drivers/power/reset/at91-poweroff.c @@ -151,13 +151,11 @@ static void at91_poweroff_dt_set_wakeup_mode(struct platform_device *pdev) static int __init at91_poweroff_probe(struct platform_device *pdev) { - struct resource *res; struct device_node *np; u32 ddr_type; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - at91_shdwc.shdwc_base = devm_ioremap_resource(&pdev->dev, res); + at91_shdwc.shdwc_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(at91_shdwc.shdwc_base)) return PTR_ERR(at91_shdwc.shdwc_base); |