lkml.org 
[lkml]   [2023]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mediatek/clk-mt8173-apmixedsys: convert to devm_platform_ioremap_resource
Date
Use devm_platform_ioremap_resource to take the place of of_iomap for
avoid that we don't called iounmap when return some error or remove
device.

Signed-off-by: Hao Ge <gehao@kylinos.cn>
---
drivers/clk/mediatek/clk-mt8173-apmixedsys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
index a56c5845d07a..fe386bf8225d 100644
--- a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
@@ -90,7 +90,7 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev)
struct clk_hw *hw;
int r;

- base = of_iomap(node, 0);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (!base)
return PTR_ERR(base);

--
2.25.1

No virus found
Checked by Hillstone Network AntiVirus

\
 
 \ /
  Last update: 2023-04-13 19:05    [W:0.039 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site