linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource()
@ 2023-07-05  6:53 Yangtao Li
  2023-07-05  6:53 ` [PATCH 02/13] clk: actions: Convert to devm_platform_ioremap_resource() Yangtao Li
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-05  6:53 UTC (permalink / raw)
  To: Emilio López, Michael Turquette, Stephen Boyd, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Yangtao Li, linux-clk, linux-arm-kernel, linux-sunxi,
	linux-kernel

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/clk/sunxi/clk-sun9i-mmc.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c b/drivers/clk/sunxi/clk-sun9i-mmc.c
index 636bcf2439ef..0862b02b1ed4 100644
--- a/drivers/clk/sunxi/clk-sun9i-mmc.c
+++ b/drivers/clk/sunxi/clk-sun9i-mmc.c
@@ -108,15 +108,13 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
 
 	spin_lock_init(&data->lock);
 
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r)
-		return -EINVAL;
-	/* one clock/reset pair per word */
-	count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
-	data->membase = devm_ioremap_resource(&pdev->dev, r);
+	data->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
 	if (IS_ERR(data->membase))
 		return PTR_ERR(data->membase);
 
+	/* one clock/reset pair per word */
+	count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
+
 	clk_data = &data->clk_data;
 	clk_data->clk_num = count;
 	clk_data->clks = devm_kcalloc(&pdev->dev, count, sizeof(struct clk *),
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 02/13] clk: actions: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-05  6:53 ` Yangtao Li
  2023-08-22 21:54   ` Stephen Boyd
  2023-07-05  6:53 ` [PATCH 04/13] clk: bm1880: " Yangtao Li
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Yangtao Li @ 2023-07-05  6:53 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Andreas Färber,
	Manivannan Sadhasivam
  Cc: Yangtao Li, linux-clk, linux-arm-kernel, linux-actions,
	linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

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

diff --git a/drivers/clk/actions/owl-common.c b/drivers/clk/actions/owl-common.c
index 4de97cc7cb54..9e98e8a92ad7 100644
--- a/drivers/clk/actions/owl-common.c
+++ b/drivers/clk/actions/owl-common.c
@@ -43,10 +43,8 @@ int owl_clk_regmap_init(struct platform_device *pdev,
 {
 	void __iomem *base;
 	struct regmap *regmap;
-	struct resource *res;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(&pdev->dev, res);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 04/13] clk: bm1880: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
  2023-07-05  6:53 ` [PATCH 02/13] clk: actions: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-05  6:53 ` Yangtao Li
  2023-08-22 21:54   ` Stephen Boyd
  2023-07-05  6:53 ` [PATCH 08/13] clk: imx: clk-imx8qxp-lpcg: " Yangtao Li
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Yangtao Li @ 2023-07-05  6:53 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Michael Turquette, Stephen Boyd
  Cc: Yangtao Li, linux-arm-kernel, linux-clk, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/clk/clk-bm1880.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/clk-bm1880.c b/drivers/clk/clk-bm1880.c
index 2a19e50fff68..a3814817ba86 100644
--- a/drivers/clk/clk-bm1880.c
+++ b/drivers/clk/clk-bm1880.c
@@ -876,16 +876,13 @@ static int bm1880_clk_probe(struct platform_device *pdev)
 	struct bm1880_clock_data *clk_data;
 	void __iomem *pll_base, *sys_base;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	int num_clks, i;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pll_base = devm_ioremap_resource(&pdev->dev, res);
+	pll_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pll_base))
 		return PTR_ERR(pll_base);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	sys_base = devm_ioremap_resource(&pdev->dev, res);
+	sys_base = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(sys_base))
 		return PTR_ERR(sys_base);
 
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 08/13] clk: imx: clk-imx8qxp-lpcg: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
  2023-07-05  6:53 ` [PATCH 02/13] clk: actions: Convert to devm_platform_ioremap_resource() Yangtao Li
  2023-07-05  6:53 ` [PATCH 04/13] clk: bm1880: " Yangtao Li
@ 2023-07-05  6:53 ` Yangtao Li
  2023-07-05  6:53 ` [PATCH 09/13] clk: mediatek: " Yangtao Li
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-05  6:53 UTC (permalink / raw)
  To: Abel Vesa, Peng Fan, Michael Turquette, Stephen Boyd, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team
  Cc: Yangtao Li, linux-clk, linux-arm-kernel, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

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

diff --git a/drivers/clk/imx/clk-imx8qxp-lpcg.c b/drivers/clk/imx/clk-imx8qxp-lpcg.c
index 5e31a6a24b3a..e0ee9a2572d0 100644
--- a/drivers/clk/imx/clk-imx8qxp-lpcg.c
+++ b/drivers/clk/imx/clk-imx8qxp-lpcg.c
@@ -183,7 +183,6 @@ static int imx_lpcg_parse_clks_from_dt(struct platform_device *pdev,
 	unsigned int bit_offset[IMX_LPCG_MAX_CLKS];
 	struct clk_hw_onecell_data *clk_data;
 	struct clk_hw **clk_hws;
-	struct resource *res;
 	void __iomem *base;
 	int count;
 	int idx;
@@ -193,8 +192,7 @@ static int imx_lpcg_parse_clks_from_dt(struct platform_device *pdev,
 	if (!of_device_is_compatible(np, "fsl,imx8qxp-lpcg"))
 		return -EINVAL;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(&pdev->dev, res);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 09/13] clk: mediatek: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
                   ` (2 preceding siblings ...)
  2023-07-05  6:53 ` [PATCH 08/13] clk: imx: clk-imx8qxp-lpcg: " Yangtao Li
@ 2023-07-05  6:53 ` Yangtao Li
  2023-08-22 21:53   ` Stephen Boyd
  2023-07-05  6:53 ` [PATCH 12/13] clk: nuvoton: " Yangtao Li
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Yangtao Li @ 2023-07-05  6:53 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Yangtao Li, linux-clk, linux-kernel, linux-arm-kernel,
	linux-mediatek

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/clk/mediatek/clk-mt2701.c |  6 ++----
 drivers/clk/mediatek/clk-mt6765.c | 21 ++++++---------------
 2 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/drivers/clk/mediatek/clk-mt2701.c b/drivers/clk/mediatek/clk-mt2701.c
index 4a154da8a543..4269eb37be2f 100644
--- a/drivers/clk/mediatek/clk-mt2701.c
+++ b/drivers/clk/mediatek/clk-mt2701.c
@@ -663,9 +663,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
 	struct clk_hw_onecell_data *clk_data;
 	void __iomem *base;
 	struct device_node *node = pdev->dev.of_node;
-	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-	base = devm_ioremap_resource(&pdev->dev, res);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
@@ -887,9 +886,8 @@ static int mtk_pericfg_init(struct platform_device *pdev)
 	void __iomem *base;
 	int r;
 	struct device_node *node = pdev->dev.of_node;
-	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-	base = devm_ioremap_resource(&pdev->dev, res);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
diff --git a/drivers/clk/mediatek/clk-mt6765.c b/drivers/clk/mediatek/clk-mt6765.c
index 0377e6dd3206..bd957d7c6d54 100644
--- a/drivers/clk/mediatek/clk-mt6765.c
+++ b/drivers/clk/mediatek/clk-mt6765.c
@@ -731,13 +731,10 @@ static int clk_mt6765_apmixed_probe(struct platform_device *pdev)
 	int r;
 	struct device_node *node = pdev->dev.of_node;
 	void __iomem *base;
-	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-	base = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(base)) {
-		pr_err("%s(): ioremap failed\n", __func__);
+	base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(base))
 		return PTR_ERR(base);
-	}
 
 	clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
 
@@ -766,13 +763,10 @@ static int clk_mt6765_top_probe(struct platform_device *pdev)
 	struct device_node *node = pdev->dev.of_node;
 	void __iomem *base;
 	struct clk_hw_onecell_data *clk_data;
-	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-	base = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(base)) {
-		pr_err("%s(): ioremap failed\n", __func__);
+	base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(base))
 		return PTR_ERR(base);
-	}
 
 	clk_data = mtk_alloc_clk_data(CLK_TOP_NR_CLK);
 
@@ -807,13 +801,10 @@ static int clk_mt6765_ifr_probe(struct platform_device *pdev)
 	int r;
 	struct device_node *node = pdev->dev.of_node;
 	void __iomem *base;
-	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-	base = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(base)) {
-		pr_err("%s(): ioremap failed\n", __func__);
+	base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(base))
 		return PTR_ERR(base);
-	}
 
 	clk_data = mtk_alloc_clk_data(CLK_IFR_NR_CLK);
 
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 12/13] clk: nuvoton: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
                   ` (3 preceding siblings ...)
  2023-07-05  6:53 ` [PATCH 09/13] clk: mediatek: " Yangtao Li
@ 2023-07-05  6:53 ` Yangtao Li
  2023-07-05  7:57   ` Jacky Huang
  2023-08-22 21:51   ` Stephen Boyd
  2023-07-05  6:53 ` [PATCH 13/13] clk: mvebu: " Yangtao Li
                   ` (3 subsequent siblings)
  8 siblings, 2 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-05  6:53 UTC (permalink / raw)
  To: Jacky Huang, Shan-Chun Hung, Michael Turquette, Stephen Boyd
  Cc: Yangtao Li, linux-arm-kernel, linux-clk, linux-kernel

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(-)

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);
 
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 13/13] clk: mvebu: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
                   ` (4 preceding siblings ...)
  2023-07-05  6:53 ` [PATCH 12/13] clk: nuvoton: " Yangtao Li
@ 2023-07-05  6:53 ` Yangtao Li
  2023-08-22 21:51   ` Stephen Boyd
  2023-07-11 18:27 ` [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Jernej Škrabec
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Yangtao Li @ 2023-07-05  6:53 UTC (permalink / raw)
  To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Michael Turquette, Stephen Boyd
  Cc: Yangtao Li, linux-arm-kernel, linux-clk, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/clk/mvebu/armada-37xx-periph.c | 4 +---
 drivers/clk/mvebu/armada-37xx-tbg.c    | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c
index 3ae6078f6ff7..b576766e67bc 100644
--- a/drivers/clk/mvebu/armada-37xx-periph.c
+++ b/drivers/clk/mvebu/armada-37xx-periph.c
@@ -733,7 +733,6 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev)
 	const struct clk_periph_data *data;
 	struct device *dev = &pdev->dev;
 	int num_periph = 0, i, ret;
-	struct resource *res;
 
 	data = of_device_get_match_data(dev);
 	if (!data)
@@ -754,8 +753,7 @@ static int armada_3700_periph_clock_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	driver_data->hw_data->num = num_periph;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	driver_data->reg = devm_ioremap_resource(dev, res);
+	driver_data->reg = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(driver_data->reg))
 		return PTR_ERR(driver_data->reg);
 
diff --git a/drivers/clk/mvebu/armada-37xx-tbg.c b/drivers/clk/mvebu/armada-37xx-tbg.c
index eccc1aeefbaf..e94c336e0f1c 100644
--- a/drivers/clk/mvebu/armada-37xx-tbg.c
+++ b/drivers/clk/mvebu/armada-37xx-tbg.c
@@ -84,7 +84,6 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
 	struct clk_hw_onecell_data *hw_tbg_data;
 	struct device *dev = &pdev->dev;
 	const char *parent_name;
-	struct resource *res;
 	struct clk *parent;
 	void __iomem *reg;
 	int i;
@@ -105,8 +104,7 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev)
 	parent_name = __clk_get_name(parent);
 	clk_put(parent);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	reg = devm_ioremap_resource(dev, res);
+	reg = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(reg))
 		return PTR_ERR(reg);
 
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 12/13] clk: nuvoton: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 ` [PATCH 12/13] clk: nuvoton: " Yangtao Li
@ 2023-07-05  7:57   ` Jacky Huang
  2023-08-22 21:51   ` Stephen Boyd
  1 sibling, 0 replies; 16+ messages in thread
From: Jacky Huang @ 2023-07-05  7:57 UTC (permalink / raw)
  To: Yangtao Li, Shan-Chun Hung, Michael Turquette, Stephen Boyd
  Cc: linux-arm-kernel, linux-clk, linux-kernel



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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource()
  2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
                   ` (5 preceding siblings ...)
  2023-07-05  6:53 ` [PATCH 13/13] clk: mvebu: " Yangtao Li
@ 2023-07-11 18:27 ` Jernej Škrabec
  2023-07-30 22:44 ` Jernej Škrabec
  2023-08-14 10:09 ` Abel Vesa
  8 siblings, 0 replies; 16+ messages in thread
From: Jernej Škrabec @ 2023-07-11 18:27 UTC (permalink / raw)
  To: Emilio López, Michael Turquette, Stephen Boyd, Chen-Yu Tsai,
	Samuel Holland, Yangtao Li
  Cc: Yangtao Li, linux-clk, linux-arm-kernel, linux-sunxi,
	linux-kernel

Dne sreda, 05. julij 2023 ob 08:53:01 CEST je Yangtao Li napisal(a):
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  drivers/clk/sunxi/clk-sun9i-mmc.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c
> b/drivers/clk/sunxi/clk-sun9i-mmc.c index 636bcf2439ef..0862b02b1ed4 100644
> --- a/drivers/clk/sunxi/clk-sun9i-mmc.c
> +++ b/drivers/clk/sunxi/clk-sun9i-mmc.c
> @@ -108,15 +108,13 @@ static int sun9i_a80_mmc_config_clk_probe(struct
> platform_device *pdev)
> 
>  	spin_lock_init(&data->lock);
> 
> -	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!r)
> -		return -EINVAL;
> -	/* one clock/reset pair per word */
> -	count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
> -	data->membase = devm_ioremap_resource(&pdev->dev, r);
> +	data->membase = devm_platform_get_and_ioremap_resource(pdev, 0, 
&r);
>  	if (IS_ERR(data->membase))
>  		return PTR_ERR(data->membase);
> 
> +	/* one clock/reset pair per word */
> +	count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
> +
>  	clk_data = &data->clk_data;
>  	clk_data->clk_num = count;
>  	clk_data->clks = devm_kcalloc(&pdev->dev, count, sizeof(struct clk 
*),





_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource()
  2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
                   ` (6 preceding siblings ...)
  2023-07-11 18:27 ` [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Jernej Škrabec
@ 2023-07-30 22:44 ` Jernej Škrabec
  2023-08-14 10:09 ` Abel Vesa
  8 siblings, 0 replies; 16+ messages in thread
From: Jernej Škrabec @ 2023-07-30 22:44 UTC (permalink / raw)
  To: Emilio López, Michael Turquette, Stephen Boyd, Chen-Yu Tsai,
	Samuel Holland, Yangtao Li
  Cc: Yangtao Li, linux-clk, linux-arm-kernel, linux-sunxi,
	linux-kernel

Dne sreda, 05. julij 2023 ob 08:53:01 CEST je Yangtao Li napisal(a):
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Applied, thanks!

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource()
  2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
                   ` (7 preceding siblings ...)
  2023-07-30 22:44 ` Jernej Škrabec
@ 2023-08-14 10:09 ` Abel Vesa
  8 siblings, 0 replies; 16+ messages in thread
From: Abel Vesa @ 2023-08-14 10:09 UTC (permalink / raw)
  To: Emilio López, Michael Turquette, Stephen Boyd, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Yangtao Li
  Cc: linux-clk, linux-arm-kernel, linux-sunxi, linux-kernel


On Wed, 05 Jul 2023 14:53:01 +0800, Yangtao Li wrote:
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> 

Applied, thanks!

[08/13] clk: imx: clk-imx8qxp-lpcg: Convert to devm_platform_ioremap_resource()
        commit: 94945b23133db0b698ffe764d8a82593906d1e74

Best regards,
-- 
Abel Vesa <abel.vesa@linaro.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 13/13] clk: mvebu: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 ` [PATCH 13/13] clk: mvebu: " Yangtao Li
@ 2023-08-22 21:51   ` Stephen Boyd
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Boyd @ 2023-08-22 21:51 UTC (permalink / raw)
  To: Andrew Lunn, Gregory Clement, Michael Turquette,
	Sebastian Hesselbarth, Yangtao Li
  Cc: Yangtao Li, linux-arm-kernel, linux-clk, linux-kernel

Quoting Yangtao Li (2023-07-04 23:53:13)
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---

Applied to clk-next

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 12/13] clk: nuvoton: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 ` [PATCH 12/13] clk: nuvoton: " Yangtao Li
  2023-07-05  7:57   ` Jacky Huang
@ 2023-08-22 21:51   ` Stephen Boyd
  1 sibling, 0 replies; 16+ messages in thread
From: Stephen Boyd @ 2023-08-22 21:51 UTC (permalink / raw)
  To: Jacky Huang, Michael Turquette, Shan-Chun Hung, Yangtao Li
  Cc: Yangtao Li, linux-arm-kernel, linux-clk, linux-kernel

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 09/13] clk: mediatek: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 ` [PATCH 09/13] clk: mediatek: " Yangtao Li
@ 2023-08-22 21:53   ` Stephen Boyd
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Boyd @ 2023-08-22 21:53 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Matthias Brugger, Michael Turquette,
	Yangtao Li
  Cc: Yangtao Li, linux-clk, linux-kernel, linux-arm-kernel,
	linux-mediatek

Quoting Yangtao Li (2023-07-04 23:53:09)
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---

Applied to clk-next

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 04/13] clk: bm1880: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 ` [PATCH 04/13] clk: bm1880: " Yangtao Li
@ 2023-08-22 21:54   ` Stephen Boyd
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Boyd @ 2023-08-22 21:54 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Michael Turquette, Yangtao Li
  Cc: Yangtao Li, linux-arm-kernel, linux-clk, linux-kernel

Quoting Yangtao Li (2023-07-04 23:53:04)
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---

Applied to clk-next

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 02/13] clk: actions: Convert to devm_platform_ioremap_resource()
  2023-07-05  6:53 ` [PATCH 02/13] clk: actions: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-08-22 21:54   ` Stephen Boyd
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Boyd @ 2023-08-22 21:54 UTC (permalink / raw)
  To: Andreas Färber, Manivannan Sadhasivam, Michael Turquette,
	Yangtao Li
  Cc: Yangtao Li, linux-clk, linux-arm-kernel, linux-actions,
	linux-kernel

Quoting Yangtao Li (2023-07-04 23:53:02)
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---

Applied to clk-next

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-08-22 21:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-05  6:53 [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-05  6:53 ` [PATCH 02/13] clk: actions: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-08-22 21:54   ` Stephen Boyd
2023-07-05  6:53 ` [PATCH 04/13] clk: bm1880: " Yangtao Li
2023-08-22 21:54   ` Stephen Boyd
2023-07-05  6:53 ` [PATCH 08/13] clk: imx: clk-imx8qxp-lpcg: " Yangtao Li
2023-07-05  6:53 ` [PATCH 09/13] clk: mediatek: " Yangtao Li
2023-08-22 21:53   ` Stephen Boyd
2023-07-05  6:53 ` [PATCH 12/13] clk: nuvoton: " Yangtao Li
2023-07-05  7:57   ` Jacky Huang
2023-08-22 21:51   ` Stephen Boyd
2023-07-05  6:53 ` [PATCH 13/13] clk: mvebu: " Yangtao Li
2023-08-22 21:51   ` Stephen Boyd
2023-07-11 18:27 ` [PATCH 01/13] clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource() Jernej Škrabec
2023-07-30 22:44 ` Jernej Škrabec
2023-08-14 10:09 ` Abel Vesa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).