linux-kernel.vger.kernel.org archive mirror
 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
  2021-09-08  7:11 ` [PATCH 1/2] soc: bcm: bcm-pmb: " Cai Huoqing
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ 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] 8+ messages in thread
* [PATCH 1/2] soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:16 Cai Huoqing
  2021-10-22  0:34 ` Li Yang
  0 siblings, 1 reply; 8+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:16 UTC (permalink / raw)
  To: caihuoqing; +Cc: Li Yang, linuxppc-dev, linux-arm-kernel, 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/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] 8+ messages in thread

end of thread, other threads:[~2021-10-22  0:34 UTC | newest]

Thread overview: 8+ 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 ` [PATCH 1/2] soc: bcm: bcm-pmb: " Cai Huoqing
2021-09-08  7:11 ` [PATCH 1/2] soc: fsl: guts: " Cai Huoqing
2021-09-08  7:11 ` [PATCH] soc: ixp4xx/qmgr: " 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 ` [PATCH] soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08  7:16 [PATCH 1/2] soc: fsl: guts: " Cai Huoqing
2021-10-22  0:34 ` Li Yang

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