Skip to content

Commit 75cc0a1

Browse files
YueHaibingbebarino
authored andcommitted
clk: hisilicon: 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 4d3a369 commit 75cc0a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/hisilicon/reset.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,12 @@ static const struct reset_control_ops hisi_reset_ops = {
9090
struct hisi_reset_controller *hisi_reset_init(struct platform_device *pdev)
9191
{
9292
struct hisi_reset_controller *rstc;
93-
struct resource *res;
9493

9594
rstc = devm_kmalloc(&pdev->dev, sizeof(*rstc), GFP_KERNEL);
9695
if (!rstc)
9796
return NULL;
9897

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

0 commit comments

Comments
 (0)