summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-04 16:03:04 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2023-07-20 00:28:58 +0300
commit5d002da7296c50d3fcc50af29bf1e507585703e0 (patch)
tree04813274468830ad686acb85c10c5cedaff76df0 /drivers/power
parent0b64a0e53cc7875c2410b26a20c1269d72cd1428 (diff)
downloadlinux-5d002da7296c50d3fcc50af29bf1e507585703e0.tar.xz
power: reset: at91-sama5d2_shdwc: 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-sama5d2_shdwc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c
index d8ecffe72f16..e76b102b57b1 100644
--- a/drivers/power/reset/at91-sama5d2_shdwc.c
+++ b/drivers/power/reset/at91-sama5d2_shdwc.c
@@ -331,7 +331,6 @@ static const struct of_device_id at91_pmc_ids[] = {
static int __init at91_shdwc_probe(struct platform_device *pdev)
{
- struct resource *res;
const struct of_device_id *match;
struct device_node *np;
u32 ddr_type;
@@ -349,8 +348,7 @@ static int __init at91_shdwc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, at91_shdwc);
- 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);