* [PATCH 1/2] soc: bcm: bcm-pmb: Make use of the helper function devm_platform_ioremap_resource()
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 ` [PATCH 1/2] soc: fsl: guts: " Cai Huoqing
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ 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] 6+ messages in thread
* [PATCH 1/2] soc: fsl: guts: Make use of the helper function devm_platform_ioremap_resource()
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 ` Cai Huoqing
2021-09-08 7:11 ` [PATCH] soc: ixp4xx/qmgr: " Cai Huoqing
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ 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] 6+ messages in thread
* [PATCH] soc: ixp4xx/qmgr: Make use of the helper function devm_platform_ioremap_resource()
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 ` 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
4 siblings, 0 replies; 6+ 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] 6+ 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 [PATCH 1/2] soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
` (2 preceding siblings ...)
2021-09-08 7:11 ` [PATCH] soc: ixp4xx/qmgr: " 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
4 siblings, 0 replies; 6+ 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] 6+ messages in thread
* [PATCH] soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource()
2021-09-08 7:11 [PATCH 1/2] soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
` (3 preceding siblings ...)
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
4 siblings, 0 replies; 6+ 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] 6+ messages in thread