Skip to content

Commit 0b17159

Browse files
YueHaibingbebarino
authored andcommitted
clk: mediatek: mt6797: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent aa13600 commit 0b17159

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/clk/mediatek/clk-mt6797.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
385385
struct clk_onecell_data *clk_data;
386386
void __iomem *base;
387387
struct device_node *node = pdev->dev.of_node;
388-
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
389388

390-
base = devm_ioremap_resource(&pdev->dev, res);
389+
base = devm_platform_ioremap_resource(pdev, 0);
391390
if (IS_ERR(base))
392391
return PTR_ERR(base);
393392

0 commit comments

Comments
 (0)