Skip to content

Commit 41ccb3a

Browse files
Ye XingchenpH5
authored andcommitted
reset: ath79: 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/202302161049100728015@zte.com.cn Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent ac9a786 commit 41ccb3a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/reset/reset-ath79.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ static int ath79_reset_restart_handler(struct notifier_block *nb,
8686
static int ath79_reset_probe(struct platform_device *pdev)
8787
{
8888
struct ath79_reset *ath79_reset;
89-
struct resource *res;
9089
int err;
9190

9291
ath79_reset = devm_kzalloc(&pdev->dev,
@@ -96,8 +95,7 @@ static int ath79_reset_probe(struct platform_device *pdev)
9695

9796
platform_set_drvdata(pdev, ath79_reset);
9897

99-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
100-
ath79_reset->base = devm_ioremap_resource(&pdev->dev, res);
98+
ath79_reset->base = devm_platform_ioremap_resource(pdev, 0);
10199
if (IS_ERR(ath79_reset->base))
102100
return PTR_ERR(ath79_reset->base);
103101

0 commit comments

Comments
 (0)