Skip to content

Commit 5d002da

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

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/power/reset/at91-sama5d2_shdwc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ static const struct of_device_id at91_pmc_ids[] = {
331331

332332
static int __init at91_shdwc_probe(struct platform_device *pdev)
333333
{
334-
struct resource *res;
335334
const struct of_device_id *match;
336335
struct device_node *np;
337336
u32 ddr_type;
@@ -349,8 +348,7 @@ static int __init at91_shdwc_probe(struct platform_device *pdev)
349348

350349
platform_set_drvdata(pdev, at91_shdwc);
351350

352-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
353-
at91_shdwc->shdwc_base = devm_ioremap_resource(&pdev->dev, res);
351+
at91_shdwc->shdwc_base = devm_platform_ioremap_resource(pdev, 0);
354352
if (IS_ERR(at91_shdwc->shdwc_base))
355353
return PTR_ERR(at91_shdwc->shdwc_base);
356354

0 commit comments

Comments
 (0)