Skip to content

Commit 0b64a0e

Browse files
bbkzzsre
authored andcommitted
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>
1 parent d40befe commit 0b64a0e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/power/reset/at91-poweroff.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,11 @@ static void at91_poweroff_dt_set_wakeup_mode(struct platform_device *pdev)
151151

152152
static int __init at91_poweroff_probe(struct platform_device *pdev)
153153
{
154-
struct resource *res;
155154
struct device_node *np;
156155
u32 ddr_type;
157156
int ret;
158157

159-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
160-
at91_shdwc.shdwc_base = devm_ioremap_resource(&pdev->dev, res);
158+
at91_shdwc.shdwc_base = devm_platform_ioremap_resource(pdev, 0);
161159
if (IS_ERR(at91_shdwc.shdwc_base))
162160
return PTR_ERR(at91_shdwc.shdwc_base);
163161

0 commit comments

Comments
 (0)