All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11 ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/amlogic/meson-canvas.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c
index d0329ad170d1..383b0cfc584e 100644
--- a/drivers/soc/amlogic/meson-canvas.c
+++ b/drivers/soc/amlogic/meson-canvas.c
@@ -168,7 +168,6 @@ EXPORT_SYMBOL_GPL(meson_canvas_free);
 
 static int meson_canvas_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct meson_canvas *canvas;
 	struct device *dev = &pdev->dev;
 
@@ -176,8 +175,7 @@ static int meson_canvas_probe(struct platform_device *pdev)
 	if (!canvas)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	canvas->reg_base = devm_ioremap_resource(dev, res);
+	canvas->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(canvas->reg_base))
 		return PTR_ERR(canvas->reg_base);
 
-- 
2.25.1


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

* [PATCH 1/2] soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11 ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/amlogic/meson-canvas.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c
index d0329ad170d1..383b0cfc584e 100644
--- a/drivers/soc/amlogic/meson-canvas.c
+++ b/drivers/soc/amlogic/meson-canvas.c
@@ -168,7 +168,6 @@ EXPORT_SYMBOL_GPL(meson_canvas_free);
 
 static int meson_canvas_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct meson_canvas *canvas;
 	struct device *dev = &pdev->dev;
 
@@ -176,8 +175,7 @@ static int meson_canvas_probe(struct platform_device *pdev)
 	if (!canvas)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	canvas->reg_base = devm_ioremap_resource(dev, res);
+	canvas->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(canvas->reg_base))
 		return PTR_ERR(canvas->reg_base);
 
-- 
2.25.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 1/2] soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11 ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/amlogic/meson-canvas.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c
index d0329ad170d1..383b0cfc584e 100644
--- a/drivers/soc/amlogic/meson-canvas.c
+++ b/drivers/soc/amlogic/meson-canvas.c
@@ -168,7 +168,6 @@ EXPORT_SYMBOL_GPL(meson_canvas_free);
 
 static int meson_canvas_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct meson_canvas *canvas;
 	struct device *dev = &pdev->dev;
 
@@ -176,8 +175,7 @@ static int meson_canvas_probe(struct platform_device *pdev)
 	if (!canvas)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	canvas->reg_base = devm_ioremap_resource(dev, res);
+	canvas->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(canvas->reg_base))
 		return PTR_ERR(canvas->reg_base);
 
-- 
2.25.1


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

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

* [PATCH 1/2] soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11 ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/amlogic/meson-canvas.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c
index d0329ad170d1..383b0cfc584e 100644
--- a/drivers/soc/amlogic/meson-canvas.c
+++ b/drivers/soc/amlogic/meson-canvas.c
@@ -168,7 +168,6 @@ EXPORT_SYMBOL_GPL(meson_canvas_free);
 
 static int meson_canvas_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct meson_canvas *canvas;
 	struct device *dev = &pdev->dev;
 
@@ -176,8 +175,7 @@ static int meson_canvas_probe(struct platform_device *pdev)
 	if (!canvas)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	canvas->reg_base = devm_ioremap_resource(dev, res);
+	canvas->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(canvas->reg_base))
 		return PTR_ERR(canvas->reg_base);
 
-- 
2.25.1


_______________________________________________
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] 31+ messages in thread

* [PATCH 1/2] soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11 ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Nishanth Menon, Neil Armstrong, linux-kernel, linux-tegra,
	Thierry Reding, Rafał Miłecki, Jerome Brunet,
	Florian Fainelli, Kevin Hilman, Jernej Skrabec, Jonathan Hunter,
	Chen-Yu Tsai, bcm-kernel-feedback-list, linux-sunxi, linux-pm,
	Martin Blumenstingl, Maxime Ripard, Krzysztof Halasa,
	Santosh Shilimkar, Matthias Brugger, linux-amlogic,
	linux-arm-kernel, linux-mips, Li Yang, linux-mediatek,
	linuxppc-dev

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/soc/amlogic/meson-canvas.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c
index d0329ad170d1..383b0cfc584e 100644
--- a/drivers/soc/amlogic/meson-canvas.c
+++ b/drivers/soc/amlogic/meson-canvas.c
@@ -168,7 +168,6 @@ EXPORT_SYMBOL_GPL(meson_canvas_free);
 
 static int meson_canvas_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct meson_canvas *canvas;
 	struct device *dev = &pdev->dev;
 
@@ -176,8 +175,7 @@ static int meson_canvas_probe(struct platform_device *pdev)
 	if (!canvas)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	canvas->reg_base = devm_ioremap_resource(dev, res);
+	canvas->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(canvas->reg_base))
 		return PTR_ERR(canvas->reg_base);
 
-- 
2.25.1


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

* [PATCH 1/2] soc: bcm: bcm-pmb: Make use of the helper function devm_platform_ioremap_resource()
  2021-09-08  7:11 ` Cai Huoqing
                     ` (2 preceding siblings ...)
  (?)
@ 2021-09-08  7:11   ` Cai Huoqing
  -1 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/bcm/bcm63xx/bcm-pmb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/bcm/bcm63xx/bcm-pmb.c b/drivers/soc/bcm/bcm63xx/bcm-pmb.c
index 774465c119be..7bbe46ea5f94 100644
--- a/drivers/soc/bcm/bcm63xx/bcm-pmb.c
+++ b/drivers/soc/bcm/bcm63xx/bcm-pmb.c
@@ -276,7 +276,6 @@ static int bcm_pmb_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	const struct bcm_pmb_pd_data *table;
 	const struct bcm_pmb_pd_data *e;
-	struct resource *res;
 	struct bcm_pmb *pmb;
 	int max_id;
 	int err;
@@ -287,8 +286,7 @@ static int bcm_pmb_probe(struct platform_device *pdev)
 
 	pmb->dev = dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pmb->base = devm_ioremap_resource(&pdev->dev, res);
+	pmb->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pmb->base))
 		return PTR_ERR(pmb->base);
 
-- 
2.25.1


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

* [PATCH 1/2] soc: bcm: bcm-pmb: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/bcm/bcm63xx/bcm-pmb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/bcm/bcm63xx/bcm-pmb.c b/drivers/soc/bcm/bcm63xx/bcm-pmb.c
index 774465c119be..7bbe46ea5f94 100644
--- a/drivers/soc/bcm/bcm63xx/bcm-pmb.c
+++ b/drivers/soc/bcm/bcm63xx/bcm-pmb.c
@@ -276,7 +276,6 @@ static int bcm_pmb_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	const struct bcm_pmb_pd_data *table;
 	const struct bcm_pmb_pd_data *e;
-	struct resource *res;
 	struct bcm_pmb *pmb;
 	int max_id;
 	int err;
@@ -287,8 +286,7 @@ static int bcm_pmb_probe(struct platform_device *pdev)
 
 	pmb->dev = dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pmb->base = devm_ioremap_resource(&pdev->dev, res);
+	pmb->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pmb->base))
 		return PTR_ERR(pmb->base);
 
-- 
2.25.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 1/2] soc: bcm: bcm-pmb: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/bcm/bcm63xx/bcm-pmb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/bcm/bcm63xx/bcm-pmb.c b/drivers/soc/bcm/bcm63xx/bcm-pmb.c
index 774465c119be..7bbe46ea5f94 100644
--- a/drivers/soc/bcm/bcm63xx/bcm-pmb.c
+++ b/drivers/soc/bcm/bcm63xx/bcm-pmb.c
@@ -276,7 +276,6 @@ static int bcm_pmb_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	const struct bcm_pmb_pd_data *table;
 	const struct bcm_pmb_pd_data *e;
-	struct resource *res;
 	struct bcm_pmb *pmb;
 	int max_id;
 	int err;
@@ -287,8 +286,7 @@ static int bcm_pmb_probe(struct platform_device *pdev)
 
 	pmb->dev = dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pmb->base = devm_ioremap_resource(&pdev->dev, res);
+	pmb->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pmb->base))
 		return PTR_ERR(pmb->base);
 
-- 
2.25.1


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

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

* [PATCH 1/2] soc: bcm: bcm-pmb: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/bcm/bcm63xx/bcm-pmb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/bcm/bcm63xx/bcm-pmb.c b/drivers/soc/bcm/bcm63xx/bcm-pmb.c
index 774465c119be..7bbe46ea5f94 100644
--- a/drivers/soc/bcm/bcm63xx/bcm-pmb.c
+++ b/drivers/soc/bcm/bcm63xx/bcm-pmb.c
@@ -276,7 +276,6 @@ static int bcm_pmb_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	const struct bcm_pmb_pd_data *table;
 	const struct bcm_pmb_pd_data *e;
-	struct resource *res;
 	struct bcm_pmb *pmb;
 	int max_id;
 	int err;
@@ -287,8 +286,7 @@ static int bcm_pmb_probe(struct platform_device *pdev)
 
 	pmb->dev = dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pmb->base = devm_ioremap_resource(&pdev->dev, res);
+	pmb->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pmb->base))
 		return PTR_ERR(pmb->base);
 
-- 
2.25.1


_______________________________________________
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] 31+ messages in thread

* [PATCH 1/2] soc: bcm: bcm-pmb: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Nishanth Menon, Neil Armstrong, linux-kernel, linux-tegra,
	Thierry Reding, Rafał Miłecki, Jerome Brunet,
	Florian Fainelli, Kevin Hilman, Jernej Skrabec, Jonathan Hunter,
	Chen-Yu Tsai, bcm-kernel-feedback-list, linux-sunxi, linux-pm,
	Martin Blumenstingl, Maxime Ripard, Krzysztof Halasa,
	Santosh Shilimkar, Matthias Brugger, linux-amlogic,
	linux-arm-kernel, linux-mips, Li Yang, linux-mediatek,
	linuxppc-dev

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/soc/bcm/bcm63xx/bcm-pmb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/bcm/bcm63xx/bcm-pmb.c b/drivers/soc/bcm/bcm63xx/bcm-pmb.c
index 774465c119be..7bbe46ea5f94 100644
--- a/drivers/soc/bcm/bcm63xx/bcm-pmb.c
+++ b/drivers/soc/bcm/bcm63xx/bcm-pmb.c
@@ -276,7 +276,6 @@ static int bcm_pmb_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	const struct bcm_pmb_pd_data *table;
 	const struct bcm_pmb_pd_data *e;
-	struct resource *res;
 	struct bcm_pmb *pmb;
 	int max_id;
 	int err;
@@ -287,8 +286,7 @@ static int bcm_pmb_probe(struct platform_device *pdev)
 
 	pmb->dev = dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pmb->base = devm_ioremap_resource(&pdev->dev, res);
+	pmb->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pmb->base))
 		return PTR_ERR(pmb->base);
 
-- 
2.25.1


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

* [PATCH 1/2] soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource()
  2021-09-08  7:11 ` Cai Huoqing
                     ` (2 preceding siblings ...)
  (?)
@ 2021-09-08  7:11   ` Cai Huoqing
  -1 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/fsl/guts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
index d5e9a5f2c087..072473a16f4d 100644
--- a/drivers/soc/fsl/guts.c
+++ b/drivers/soc/fsl/guts.c
@@ -140,7 +140,6 @@ static int fsl_guts_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	const struct fsl_soc_die_attr *soc_die;
 	const char *machine;
 	u32 svr;
@@ -152,8 +151,7 @@ static int fsl_guts_probe(struct platform_device *pdev)
 
 	guts->little_endian = of_property_read_bool(np, "little-endian");
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	guts->regs = devm_ioremap_resource(dev, res);
+	guts->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(guts->regs))
 		return PTR_ERR(guts->regs);
 
-- 
2.25.1


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

* [PATCH 1/2] soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/fsl/guts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
index d5e9a5f2c087..072473a16f4d 100644
--- a/drivers/soc/fsl/guts.c
+++ b/drivers/soc/fsl/guts.c
@@ -140,7 +140,6 @@ static int fsl_guts_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	const struct fsl_soc_die_attr *soc_die;
 	const char *machine;
 	u32 svr;
@@ -152,8 +151,7 @@ static int fsl_guts_probe(struct platform_device *pdev)
 
 	guts->little_endian = of_property_read_bool(np, "little-endian");
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	guts->regs = devm_ioremap_resource(dev, res);
+	guts->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(guts->regs))
 		return PTR_ERR(guts->regs);
 
-- 
2.25.1


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

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

* [PATCH 1/2] soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/fsl/guts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
index d5e9a5f2c087..072473a16f4d 100644
--- a/drivers/soc/fsl/guts.c
+++ b/drivers/soc/fsl/guts.c
@@ -140,7 +140,6 @@ static int fsl_guts_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	const struct fsl_soc_die_attr *soc_die;
 	const char *machine;
 	u32 svr;
@@ -152,8 +151,7 @@ static int fsl_guts_probe(struct platform_device *pdev)
 
 	guts->little_endian = of_property_read_bool(np, "little-endian");
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	guts->regs = devm_ioremap_resource(dev, res);
+	guts->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(guts->regs))
 		return PTR_ERR(guts->regs);
 
-- 
2.25.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 1/2] soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/fsl/guts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
index d5e9a5f2c087..072473a16f4d 100644
--- a/drivers/soc/fsl/guts.c
+++ b/drivers/soc/fsl/guts.c
@@ -140,7 +140,6 @@ static int fsl_guts_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	const struct fsl_soc_die_attr *soc_die;
 	const char *machine;
 	u32 svr;
@@ -152,8 +151,7 @@ static int fsl_guts_probe(struct platform_device *pdev)
 
 	guts->little_endian = of_property_read_bool(np, "little-endian");
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	guts->regs = devm_ioremap_resource(dev, res);
+	guts->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(guts->regs))
 		return PTR_ERR(guts->regs);
 
-- 
2.25.1


_______________________________________________
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] 31+ messages in thread

* [PATCH 1/2] soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Nishanth Menon, Neil Armstrong, linux-kernel, linux-tegra,
	Thierry Reding, Rafał Miłecki, Jerome Brunet,
	Florian Fainelli, Kevin Hilman, Jernej Skrabec, Jonathan Hunter,
	Chen-Yu Tsai, bcm-kernel-feedback-list, linux-sunxi, linux-pm,
	Martin Blumenstingl, Maxime Ripard, Krzysztof Halasa,
	Santosh Shilimkar, Matthias Brugger, linux-amlogic,
	linux-arm-kernel, linux-mips, Li Yang, linux-mediatek,
	linuxppc-dev

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/soc/fsl/guts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
index d5e9a5f2c087..072473a16f4d 100644
--- a/drivers/soc/fsl/guts.c
+++ b/drivers/soc/fsl/guts.c
@@ -140,7 +140,6 @@ static int fsl_guts_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	const struct fsl_soc_die_attr *soc_die;
 	const char *machine;
 	u32 svr;
@@ -152,8 +151,7 @@ static int fsl_guts_probe(struct platform_device *pdev)
 
 	guts->little_endian = of_property_read_bool(np, "little-endian");
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	guts->regs = devm_ioremap_resource(dev, res);
+	guts->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(guts->regs))
 		return PTR_ERR(guts->regs);
 
-- 
2.25.1


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

* [PATCH] soc: ixp4xx/qmgr: Make use of the helper function devm_platform_ioremap_resource()
  2021-09-08  7:11 ` Cai Huoqing
                     ` (2 preceding siblings ...)
  (?)
@ 2021-09-08  7:11   ` Cai Huoqing
  -1 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/ixp4xx/ixp4xx-qmgr.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
index 9154c7029b05..72b5a10e3104 100644
--- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c
+++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
@@ -377,13 +377,9 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
 	int i, err;
 	irq_handler_t handler1, handler2;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	int irq1, irq2;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-	qmgr_regs = devm_ioremap_resource(dev, res);
+	qmgr_regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(qmgr_regs))
 		return PTR_ERR(qmgr_regs);
 
-- 
2.25.1


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

* [PATCH] soc: ixp4xx/qmgr: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/ixp4xx/ixp4xx-qmgr.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
index 9154c7029b05..72b5a10e3104 100644
--- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c
+++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
@@ -377,13 +377,9 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
 	int i, err;
 	irq_handler_t handler1, handler2;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	int irq1, irq2;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-	qmgr_regs = devm_ioremap_resource(dev, res);
+	qmgr_regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(qmgr_regs))
 		return PTR_ERR(qmgr_regs);
 
-- 
2.25.1


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

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

* [PATCH] soc: ixp4xx/qmgr: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/ixp4xx/ixp4xx-qmgr.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
index 9154c7029b05..72b5a10e3104 100644
--- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c
+++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
@@ -377,13 +377,9 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
 	int i, err;
 	irq_handler_t handler1, handler2;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	int irq1, irq2;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-	qmgr_regs = devm_ioremap_resource(dev, res);
+	qmgr_regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(qmgr_regs))
 		return PTR_ERR(qmgr_regs);
 
-- 
2.25.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH] soc: ixp4xx/qmgr: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/ixp4xx/ixp4xx-qmgr.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
index 9154c7029b05..72b5a10e3104 100644
--- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c
+++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
@@ -377,13 +377,9 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
 	int i, err;
 	irq_handler_t handler1, handler2;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	int irq1, irq2;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-	qmgr_regs = devm_ioremap_resource(dev, res);
+	qmgr_regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(qmgr_regs))
 		return PTR_ERR(qmgr_regs);
 
-- 
2.25.1


_______________________________________________
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] 31+ messages in thread

* [PATCH] soc: ixp4xx/qmgr: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Nishanth Menon, Neil Armstrong, linux-kernel, linux-tegra,
	Thierry Reding, Rafał Miłecki, Jerome Brunet,
	Florian Fainelli, Kevin Hilman, Jernej Skrabec, Jonathan Hunter,
	Chen-Yu Tsai, bcm-kernel-feedback-list, linux-sunxi, linux-pm,
	Martin Blumenstingl, Maxime Ripard, Krzysztof Halasa,
	Santosh Shilimkar, Matthias Brugger, linux-amlogic,
	linux-arm-kernel, linux-mips, Li Yang, linux-mediatek,
	linuxppc-dev

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/soc/ixp4xx/ixp4xx-qmgr.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
index 9154c7029b05..72b5a10e3104 100644
--- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c
+++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
@@ -377,13 +377,9 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
 	int i, err;
 	irq_handler_t handler1, handler2;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	int irq1, irq2;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-	qmgr_regs = devm_ioremap_resource(dev, res);
+	qmgr_regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(qmgr_regs))
 		return PTR_ERR(qmgr_regs);
 
-- 
2.25.1


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

* [PATCH 1/3] soc: mediatek: pwrap: Make use of the helper function devm_platform_ioremap_resource_byname()
  2021-09-08  7:11 ` Cai Huoqing
                     ` (2 preceding siblings ...)
  (?)
@ 2021-09-08  7:11   ` Cai Huoqing
  -1 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 952bc554f443..29f1bd42f7a8 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -2116,7 +2116,6 @@ static int pwrap_probe(struct platform_device *pdev)
 	struct pmic_wrapper *wrp;
 	struct device_node *np = pdev->dev.of_node;
 	const struct of_device_id *of_slave_id = NULL;
-	struct resource *res;
 
 	if (np->child)
 		of_slave_id = of_match_node(of_slave_match_tbl, np->child);
@@ -2136,8 +2135,7 @@ static int pwrap_probe(struct platform_device *pdev)
 	wrp->slave = of_slave_id->data;
 	wrp->dev = &pdev->dev;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap");
-	wrp->base = devm_ioremap_resource(wrp->dev, res);
+	wrp->base = devm_platform_ioremap_resource_byname(pdev, "pwrap");
 	if (IS_ERR(wrp->base))
 		return PTR_ERR(wrp->base);
 
@@ -2151,9 +2149,7 @@ static int pwrap_probe(struct platform_device *pdev)
 	}
 
 	if (HAS_CAP(wrp->master->caps, PWRAP_CAP_BRIDGE)) {
-		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-				"pwrap-bridge");
-		wrp->bridge_base = devm_ioremap_resource(wrp->dev, res);
+		wrp->bridge_base = devm_platform_ioremap_resource_byname(pdev, "pwrap-bridge");
 		if (IS_ERR(wrp->bridge_base))
 			return PTR_ERR(wrp->bridge_base);
 
-- 
2.25.1


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

* [PATCH 1/3] soc: mediatek: pwrap: Make use of the helper function devm_platform_ioremap_resource_byname()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 952bc554f443..29f1bd42f7a8 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -2116,7 +2116,6 @@ static int pwrap_probe(struct platform_device *pdev)
 	struct pmic_wrapper *wrp;
 	struct device_node *np = pdev->dev.of_node;
 	const struct of_device_id *of_slave_id = NULL;
-	struct resource *res;
 
 	if (np->child)
 		of_slave_id = of_match_node(of_slave_match_tbl, np->child);
@@ -2136,8 +2135,7 @@ static int pwrap_probe(struct platform_device *pdev)
 	wrp->slave = of_slave_id->data;
 	wrp->dev = &pdev->dev;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap");
-	wrp->base = devm_ioremap_resource(wrp->dev, res);
+	wrp->base = devm_platform_ioremap_resource_byname(pdev, "pwrap");
 	if (IS_ERR(wrp->base))
 		return PTR_ERR(wrp->base);
 
@@ -2151,9 +2149,7 @@ static int pwrap_probe(struct platform_device *pdev)
 	}
 
 	if (HAS_CAP(wrp->master->caps, PWRAP_CAP_BRIDGE)) {
-		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-				"pwrap-bridge");
-		wrp->bridge_base = devm_ioremap_resource(wrp->dev, res);
+		wrp->bridge_base = devm_platform_ioremap_resource_byname(pdev, "pwrap-bridge");
 		if (IS_ERR(wrp->bridge_base))
 			return PTR_ERR(wrp->bridge_base);
 
-- 
2.25.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 1/3] soc: mediatek: pwrap: Make use of the helper function devm_platform_ioremap_resource_byname()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 952bc554f443..29f1bd42f7a8 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -2116,7 +2116,6 @@ static int pwrap_probe(struct platform_device *pdev)
 	struct pmic_wrapper *wrp;
 	struct device_node *np = pdev->dev.of_node;
 	const struct of_device_id *of_slave_id = NULL;
-	struct resource *res;
 
 	if (np->child)
 		of_slave_id = of_match_node(of_slave_match_tbl, np->child);
@@ -2136,8 +2135,7 @@ static int pwrap_probe(struct platform_device *pdev)
 	wrp->slave = of_slave_id->data;
 	wrp->dev = &pdev->dev;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap");
-	wrp->base = devm_ioremap_resource(wrp->dev, res);
+	wrp->base = devm_platform_ioremap_resource_byname(pdev, "pwrap");
 	if (IS_ERR(wrp->base))
 		return PTR_ERR(wrp->base);
 
@@ -2151,9 +2149,7 @@ static int pwrap_probe(struct platform_device *pdev)
 	}
 
 	if (HAS_CAP(wrp->master->caps, PWRAP_CAP_BRIDGE)) {
-		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-				"pwrap-bridge");
-		wrp->bridge_base = devm_ioremap_resource(wrp->dev, res);
+		wrp->bridge_base = devm_platform_ioremap_resource_byname(pdev, "pwrap-bridge");
 		if (IS_ERR(wrp->bridge_base))
 			return PTR_ERR(wrp->bridge_base);
 
-- 
2.25.1


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

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

* [PATCH 1/3] soc: mediatek: pwrap: Make use of the helper function devm_platform_ioremap_resource_byname()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 952bc554f443..29f1bd42f7a8 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -2116,7 +2116,6 @@ static int pwrap_probe(struct platform_device *pdev)
 	struct pmic_wrapper *wrp;
 	struct device_node *np = pdev->dev.of_node;
 	const struct of_device_id *of_slave_id = NULL;
-	struct resource *res;
 
 	if (np->child)
 		of_slave_id = of_match_node(of_slave_match_tbl, np->child);
@@ -2136,8 +2135,7 @@ static int pwrap_probe(struct platform_device *pdev)
 	wrp->slave = of_slave_id->data;
 	wrp->dev = &pdev->dev;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap");
-	wrp->base = devm_ioremap_resource(wrp->dev, res);
+	wrp->base = devm_platform_ioremap_resource_byname(pdev, "pwrap");
 	if (IS_ERR(wrp->base))
 		return PTR_ERR(wrp->base);
 
@@ -2151,9 +2149,7 @@ static int pwrap_probe(struct platform_device *pdev)
 	}
 
 	if (HAS_CAP(wrp->master->caps, PWRAP_CAP_BRIDGE)) {
-		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-				"pwrap-bridge");
-		wrp->bridge_base = devm_ioremap_resource(wrp->dev, res);
+		wrp->bridge_base = devm_platform_ioremap_resource_byname(pdev, "pwrap-bridge");
 		if (IS_ERR(wrp->bridge_base))
 			return PTR_ERR(wrp->bridge_base);
 
-- 
2.25.1


_______________________________________________
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] 31+ messages in thread

* [PATCH 1/3] soc: mediatek: pwrap: Make use of the helper function devm_platform_ioremap_resource_byname()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Nishanth Menon, Neil Armstrong, linux-kernel, linux-tegra,
	Thierry Reding, Rafał Miłecki, Jerome Brunet,
	Florian Fainelli, Kevin Hilman, Jernej Skrabec, Jonathan Hunter,
	Chen-Yu Tsai, bcm-kernel-feedback-list, linux-sunxi, linux-pm,
	Martin Blumenstingl, Maxime Ripard, Krzysztof Halasa,
	Santosh Shilimkar, Matthias Brugger, linux-amlogic,
	linux-arm-kernel, linux-mips, Li Yang, linux-mediatek,
	linuxppc-dev

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 952bc554f443..29f1bd42f7a8 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -2116,7 +2116,6 @@ static int pwrap_probe(struct platform_device *pdev)
 	struct pmic_wrapper *wrp;
 	struct device_node *np = pdev->dev.of_node;
 	const struct of_device_id *of_slave_id = NULL;
-	struct resource *res;
 
 	if (np->child)
 		of_slave_id = of_match_node(of_slave_match_tbl, np->child);
@@ -2136,8 +2135,7 @@ static int pwrap_probe(struct platform_device *pdev)
 	wrp->slave = of_slave_id->data;
 	wrp->dev = &pdev->dev;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap");
-	wrp->base = devm_ioremap_resource(wrp->dev, res);
+	wrp->base = devm_platform_ioremap_resource_byname(pdev, "pwrap");
 	if (IS_ERR(wrp->base))
 		return PTR_ERR(wrp->base);
 
@@ -2151,9 +2149,7 @@ static int pwrap_probe(struct platform_device *pdev)
 	}
 
 	if (HAS_CAP(wrp->master->caps, PWRAP_CAP_BRIDGE)) {
-		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-				"pwrap-bridge");
-		wrp->bridge_base = devm_ioremap_resource(wrp->dev, res);
+		wrp->bridge_base = devm_platform_ioremap_resource_byname(pdev, "pwrap-bridge");
 		if (IS_ERR(wrp->bridge_base))
 			return PTR_ERR(wrp->bridge_base);
 
-- 
2.25.1


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

* [PATCH] soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource()
  2021-09-08  7:11 ` Cai Huoqing
                     ` (2 preceding siblings ...)
  (?)
@ 2021-09-08  7:11   ` Cai Huoqing
  -1 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/sunxi/sunxi_sram.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index 42833e33a96c..a8f3876963a0 100644
--- a/drivers/soc/sunxi/sunxi_sram.c
+++ b/drivers/soc/sunxi/sunxi_sram.c
@@ -331,7 +331,6 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = {
 
 static int sunxi_sram_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct dentry *d;
 	struct regmap *emac_clock;
 	const struct sunxi_sramc_variant *variant;
@@ -342,8 +341,7 @@ static int sunxi_sram_probe(struct platform_device *pdev)
 	if (!variant)
 		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.25.1


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

* [PATCH] soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/sunxi/sunxi_sram.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index 42833e33a96c..a8f3876963a0 100644
--- a/drivers/soc/sunxi/sunxi_sram.c
+++ b/drivers/soc/sunxi/sunxi_sram.c
@@ -331,7 +331,6 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = {
 
 static int sunxi_sram_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct dentry *d;
 	struct regmap *emac_clock;
 	const struct sunxi_sramc_variant *variant;
@@ -342,8 +341,7 @@ static int sunxi_sram_probe(struct platform_device *pdev)
 	if (!variant)
 		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.25.1


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

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

* [PATCH] soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/sunxi/sunxi_sram.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index 42833e33a96c..a8f3876963a0 100644
--- a/drivers/soc/sunxi/sunxi_sram.c
+++ b/drivers/soc/sunxi/sunxi_sram.c
@@ -331,7 +331,6 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = {
 
 static int sunxi_sram_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct dentry *d;
 	struct regmap *emac_clock;
 	const struct sunxi_sramc_variant *variant;
@@ -342,8 +341,7 @@ static int sunxi_sram_probe(struct platform_device *pdev)
 	if (!variant)
 		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.25.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH] soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rafał Miłecki, Florian Fainelli,
	bcm-kernel-feedback-list, Li Yang, Krzysztof Halasa,
	Matthias Brugger, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec,
	Thierry Reding, Jonathan Hunter, Santosh Shilimkar,
	Nishanth Menon, linux-arm-kernel, linux-amlogic, linux-kernel,
	linux-pm, linux-mips, linuxppc-dev, linux-mediatek, linux-sunxi,
	linux-tegra

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/soc/sunxi/sunxi_sram.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index 42833e33a96c..a8f3876963a0 100644
--- a/drivers/soc/sunxi/sunxi_sram.c
+++ b/drivers/soc/sunxi/sunxi_sram.c
@@ -331,7 +331,6 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = {
 
 static int sunxi_sram_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct dentry *d;
 	struct regmap *emac_clock;
 	const struct sunxi_sramc_variant *variant;
@@ -342,8 +341,7 @@ static int sunxi_sram_probe(struct platform_device *pdev)
 	if (!variant)
 		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.25.1


_______________________________________________
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] 31+ messages in thread

* [PATCH] soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:11   ` Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:11 UTC (permalink / raw)
  To: caihuoqing
  Cc: Nishanth Menon, Neil Armstrong, linux-kernel, linux-tegra,
	Thierry Reding, Rafał Miłecki, Jerome Brunet,
	Florian Fainelli, Kevin Hilman, Jernej Skrabec, Jonathan Hunter,
	Chen-Yu Tsai, bcm-kernel-feedback-list, linux-sunxi, linux-pm,
	Martin Blumenstingl, Maxime Ripard, Krzysztof Halasa,
	Santosh Shilimkar, Matthias Brugger, linux-amlogic,
	linux-arm-kernel, linux-mips, Li Yang, linux-mediatek,
	linuxppc-dev

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/soc/sunxi/sunxi_sram.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index 42833e33a96c..a8f3876963a0 100644
--- a/drivers/soc/sunxi/sunxi_sram.c
+++ b/drivers/soc/sunxi/sunxi_sram.c
@@ -331,7 +331,6 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = {
 
 static int sunxi_sram_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct dentry *d;
 	struct regmap *emac_clock;
 	const struct sunxi_sramc_variant *variant;
@@ -342,8 +341,7 @@ static int sunxi_sram_probe(struct platform_device *pdev)
 	if (!variant)
 		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.25.1


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

* [PATCH] soc: ixp4xx/qmgr: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:17 Cai Huoqing
  0 siblings, 0 replies; 31+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:17 UTC (permalink / raw)
  To: caihuoqing; +Cc: Krzysztof Halasa, linux-kernel

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/soc/ixp4xx/ixp4xx-qmgr.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/soc/ixp4xx/ixp4xx-qmgr.c b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
index 9154c7029b05..72b5a10e3104 100644
--- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c
+++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c
@@ -377,13 +377,9 @@ static int ixp4xx_qmgr_probe(struct platform_device *pdev)
 	int i, err;
 	irq_handler_t handler1, handler2;
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	int irq1, irq2;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-	qmgr_regs = devm_ioremap_resource(dev, res);
+	qmgr_regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(qmgr_regs))
 		return PTR_ERR(qmgr_regs);
 
-- 
2.25.1


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

end of thread, other threads:[~2021-09-08  7:29 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08  7:11 [PATCH 1/2] soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08  7:11 ` Cai Huoqing
2021-09-08  7:11 ` Cai Huoqing
2021-09-08  7:11 ` Cai Huoqing
2021-09-08  7:11 ` Cai Huoqing
2021-09-08  7:11 ` [PATCH 1/2] soc: bcm: bcm-pmb: " Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11 ` [PATCH 1/2] soc: fsl: guts: " Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11 ` [PATCH] soc: ixp4xx/qmgr: " Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11 ` [PATCH 1/3] soc: mediatek: pwrap: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11 ` [PATCH] soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:11   ` Cai Huoqing
2021-09-08  7:17 [PATCH] soc: ixp4xx/qmgr: " Cai Huoqing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.