[12/13] clk: nuvoton: Convert to devm_platform_ioremap_resource()

Message ID 20230705065313.67043-12-frank.li@vivo.com
State New
Headers
Series [01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() |

Commit Message

李扬韬 July 5, 2023, 6:53 a.m. UTC
  Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/clk/nuvoton/clk-ma35d1.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Jacky Huang July 5, 2023, 7:57 a.m. UTC | #1
On 2023/7/5 下午 02:53, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>   drivers/clk/nuvoton/clk-ma35d1.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
>

Acked-by: Jacky Huang <ychuang3@nuvoton.com>

Best Regards,
Jacky Huang
  
Stephen Boyd Aug. 22, 2023, 9:51 p.m. UTC | #2
Quoting Yangtao Li (2023-07-04 23:53:12)
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---

Applied to clk-next
  

Patch

diff --git a/drivers/clk/nuvoton/clk-ma35d1.c b/drivers/clk/nuvoton/clk-ma35d1.c
index f1fe7edd21b5..9f65d0623517 100644
--- a/drivers/clk/nuvoton/clk-ma35d1.c
+++ b/drivers/clk/nuvoton/clk-ma35d1.c
@@ -460,7 +460,6 @@  static int ma35d1_clocks_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *clk_node = pdev->dev.of_node;
-	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	void __iomem *clk_base;
 	static struct clk_hw **hws;
 	static struct clk_hw_onecell_data *ma35d1_hw_data;
@@ -476,7 +475,7 @@  static int ma35d1_clocks_probe(struct platform_device *pdev)
 	ma35d1_hw_data->num = CLK_MAX_IDX;
 	hws = ma35d1_hw_data->hws;
 
-	clk_base = devm_ioremap_resource(dev, res);
+	clk_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(clk_base))
 		return PTR_ERR(clk_base);