diff mbox series

clk: samsung: exynos4412-isp: Make use of the helper function devm_platform_ioremap_resource()

Message ID 20210907085107.4203-1-caihuoqing@baidu.com
State New
Headers show
Series clk: samsung: exynos4412-isp: Make use of the helper function devm_platform_ioremap_resource() | expand

Commit Message

Cai,Huoqing Sept. 7, 2021, 8:51 a.m. UTC
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/clk/samsung/clk-exynos4412-isp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Krzysztof Kozlowski Sept. 7, 2021, 12:28 p.m. UTC | #1
On 07/09/2021 10:51, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
>  drivers/clk/samsung/clk-exynos4412-isp.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof
On 07.09.2021 10:51, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of

> calling platform_get_resource() and devm_ioremap_resource()

> separately


Thanks for the patch. I have applied it with summary line changed to 
"clk: samsung: exynos4412-isp: Make use of devm_platform_ioremap_resource()"
so it doesn't exceed 75 characters.
-- 
Regards,
Sylwester
diff mbox series

Patch

diff --git a/drivers/clk/samsung/clk-exynos4412-isp.c b/drivers/clk/samsung/clk-exynos4412-isp.c
index b69e381b8c0c..471a6fb82670 100644
--- a/drivers/clk/samsung/clk-exynos4412-isp.c
+++ b/drivers/clk/samsung/clk-exynos4412-isp.c
@@ -110,11 +110,9 @@  static int __init exynos4x12_isp_clk_probe(struct platform_device *pdev)
 	struct samsung_clk_provider *ctx;
 	struct device *dev = &pdev->dev;
 	struct device_node *np = dev->of_node;
-	struct resource *res;
 	void __iomem *reg_base;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	reg_base = devm_ioremap_resource(dev, res);
+	reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(reg_base))
 		return PTR_ERR(reg_base);