* [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource
@ 2019-12-15 17:51 Yangtao Li
2019-12-15 17:51 ` [PATCH 02/13] mmc: tmio: " Yangtao Li
` (12 more replies)
0 siblings, 13 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/sunxi-mmc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index d577a6b0ceae..f87d7967457f 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1273,8 +1273,7 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
if (ret)
return ret;
- host->reg_base = devm_ioremap_resource(&pdev->dev,
- platform_get_resource(pdev, IORESOURCE_MEM, 0));
+ host->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host->reg_base))
return PTR_ERR(host->reg_base);
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 02/13] mmc: tmio: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-18 9:47 ` Wolfram Sang
2019-12-15 17:51 ` [PATCH 03/13] mmc: meson-mx-sdio: " Yangtao Li
` (11 subsequent siblings)
12 siblings, 1 reply; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/tmio_mmc_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index c4a1d49fbea4..365d518c6d7d 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -1109,12 +1109,10 @@ struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev,
{
struct tmio_mmc_host *host;
struct mmc_host *mmc;
- struct resource *res;
void __iomem *ctl;
int ret;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ctl = devm_ioremap_resource(&pdev->dev, res);
+ ctl = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ctl))
return ERR_CAST(ctl);
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 03/13] mmc: meson-mx-sdio: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-15 17:51 ` [PATCH 02/13] mmc: tmio: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-15 17:51 ` [PATCH 04/13] mmc: sdhci-s3c: " Yangtao Li
` (10 subsequent siblings)
12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/meson-mx-sdio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
index ba9a63db73da..8b038e7b2cd3 100644
--- a/drivers/mmc/host/meson-mx-sdio.c
+++ b/drivers/mmc/host/meson-mx-sdio.c
@@ -638,7 +638,6 @@ static int meson_mx_mmc_probe(struct platform_device *pdev)
struct platform_device *slot_pdev;
struct mmc_host *mmc;
struct meson_mx_mmc_host *host;
- struct resource *res;
int ret, irq;
u32 conf;
@@ -663,8 +662,7 @@ static int meson_mx_mmc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, host);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- host->base = devm_ioremap_resource(host->controller_dev, res);
+ host->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host->base)) {
ret = PTR_ERR(host->base);
goto error_free_mmc;
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 04/13] mmc: sdhci-s3c: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-15 17:51 ` [PATCH 02/13] mmc: tmio: " Yangtao Li
2019-12-15 17:51 ` [PATCH 03/13] mmc: meson-mx-sdio: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-15 17:51 ` [PATCH 05/13] mmc: sdhci-spear: " Yangtao Li
` (9 subsequent siblings)
12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/sdhci-s3c.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 51e096f27388..e72352beb13a 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -481,7 +481,6 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct sdhci_host *host;
struct sdhci_s3c *sc;
- struct resource *res;
int ret, irq, ptr, clks;
if (!pdev->dev.platform_data && !pdev->dev.of_node) {
@@ -555,8 +554,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
goto err_no_busclks;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- host->ioaddr = devm_ioremap_resource(&pdev->dev, res);
+ host->ioaddr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host->ioaddr)) {
ret = PTR_ERR(host->ioaddr);
goto err_req_regs;
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 05/13] mmc: sdhci-spear: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
` (2 preceding siblings ...)
2019-12-15 17:51 ` [PATCH 04/13] mmc: sdhci-s3c: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-15 17:51 ` [PATCH 06/13] mmc: sh_mmcif: " Yangtao Li
` (8 subsequent siblings)
12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/sdhci-spear.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 916b5b09c3d1..37f1c41c8a9c 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -43,7 +43,6 @@ static const struct sdhci_ops sdhci_pltfm_ops = {
static int sdhci_probe(struct platform_device *pdev)
{
struct sdhci_host *host;
- struct resource *iomem;
struct spear_sdhci *sdhci;
struct device *dev;
int ret;
@@ -56,8 +55,7 @@ static int sdhci_probe(struct platform_device *pdev)
goto err;
}
- iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- host->ioaddr = devm_ioremap_resource(&pdev->dev, iomem);
+ host->ioaddr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host->ioaddr)) {
ret = PTR_ERR(host->ioaddr);
dev_dbg(&pdev->dev, "unable to map iomem: %d\n", ret);
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 06/13] mmc: sh_mmcif: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
` (3 preceding siblings ...)
2019-12-15 17:51 ` [PATCH 05/13] mmc: sdhci-spear: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-18 9:49 ` Wolfram Sang
2019-12-15 17:51 ` [PATCH 07/13] mmc: sdhci_f_sdh30: " Yangtao Li
` (7 subsequent siblings)
12 siblings, 1 reply; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/sh_mmcif.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 98c575de43c7..5069f1cbcef8 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1388,7 +1388,6 @@ static int sh_mmcif_probe(struct platform_device *pdev)
struct sh_mmcif_host *host;
struct device *dev = &pdev->dev;
struct sh_mmcif_plat_data *pd = dev->platform_data;
- struct resource *res;
void __iomem *reg;
const char *name;
@@ -1397,8 +1396,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
if (irq[0] < 0)
return -ENXIO;
- 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.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 07/13] mmc: sdhci_f_sdh30: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
` (4 preceding siblings ...)
2019-12-15 17:51 ` [PATCH 06/13] mmc: sh_mmcif: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-15 17:51 ` [PATCH 08/13] mmc: sdhci_am654: " Yangtao Li
` (6 subsequent siblings)
12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/sdhci_f_sdh30.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c
index fa0dfc657c22..4625cc071b61 100644
--- a/drivers/mmc/host/sdhci_f_sdh30.c
+++ b/drivers/mmc/host/sdhci_f_sdh30.c
@@ -89,7 +89,6 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev)
{
struct sdhci_host *host;
struct device *dev = &pdev->dev;
- struct resource *res;
int irq, ctrl = 0, ret = 0;
struct f_sdhost_priv *priv;
u32 reg = 0;
@@ -123,8 +122,7 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev)
host->ops = &sdhci_f_sdh30_ops;
host->irq = irq;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- host->ioaddr = devm_ioremap_resource(&pdev->dev, res);
+ host->ioaddr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host->ioaddr)) {
ret = PTR_ERR(host->ioaddr);
goto err;
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 08/13] mmc: sdhci_am654: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
` (5 preceding siblings ...)
2019-12-15 17:51 ` [PATCH 07/13] mmc: sdhci_f_sdh30: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-15 17:51 ` [PATCH 09/13] mmc: sdhci-milbeaut: " Yangtao Li
` (5 subsequent siblings)
12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/sdhci_am654.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index b8e897e31e2e..aa237f565e23 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -491,7 +491,6 @@ static int sdhci_am654_probe(struct platform_device *pdev)
struct sdhci_am654_data *sdhci_am654;
const struct of_device_id *match;
struct sdhci_host *host;
- struct resource *res;
struct clk *clk_xin;
struct device *dev = &pdev->dev;
void __iomem *base;
@@ -524,8 +523,7 @@ static int sdhci_am654_probe(struct platform_device *pdev)
goto pm_runtime_disable;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(base)) {
ret = PTR_ERR(base);
goto pm_runtime_put;
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 09/13] mmc: sdhci-milbeaut: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
` (6 preceding siblings ...)
2019-12-15 17:51 ` [PATCH 08/13] mmc: sdhci_am654: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-15 17:51 ` [PATCH 10/13] mmc: sdhci-msm: " Yangtao Li
` (4 subsequent siblings)
12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/sdhci-milbeaut.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c
index a1aa21b9ae1c..e6245b7bda21 100644
--- a/drivers/mmc/host/sdhci-milbeaut.c
+++ b/drivers/mmc/host/sdhci-milbeaut.c
@@ -242,7 +242,6 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev)
{
struct sdhci_host *host;
struct device *dev = &pdev->dev;
- struct resource *res;
int irq, ret = 0;
struct f_sdhost_priv *priv;
@@ -280,8 +279,7 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev)
host->ops = &sdhci_milbeaut_ops;
host->irq = irq;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- host->ioaddr = devm_ioremap_resource(&pdev->dev, res);
+ host->ioaddr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host->ioaddr)) {
ret = PTR_ERR(host->ioaddr);
goto err;
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 10/13] mmc: sdhci-msm: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
` (7 preceding siblings ...)
2019-12-15 17:51 ` [PATCH 09/13] mmc: sdhci-milbeaut: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-18 6:30 ` Bjorn Andersson
2019-12-15 17:51 ` [PATCH 11/13] mmc: mvsdio: " Yangtao Li
` (3 subsequent siblings)
12 siblings, 1 reply; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/sdhci-msm.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 3d0bb5e2e09b..6daacef4ceec 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -1746,7 +1746,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
struct sdhci_host *host;
struct sdhci_pltfm_host *pltfm_host;
struct sdhci_msm_host *msm_host;
- struct resource *core_memres;
struct clk *clk;
int ret;
u16 host_version, core_minor;
@@ -1847,9 +1846,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
}
if (!msm_host->mci_removed) {
- core_memres = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- msm_host->core_mem = devm_ioremap_resource(&pdev->dev,
- core_memres);
+ msm_host->core_mem = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(msm_host->core_mem)) {
ret = PTR_ERR(msm_host->core_mem);
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 11/13] mmc: mvsdio: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
` (8 preceding siblings ...)
2019-12-15 17:51 ` [PATCH 10/13] mmc: sdhci-msm: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-15 17:51 ` [PATCH 12/13] mmc: mtk-sd: " Yangtao Li
` (2 subsequent siblings)
12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/mvsdio.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index 74a0a7fbbf7f..203b61712601 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -696,16 +696,14 @@ static int mvsd_probe(struct platform_device *pdev)
struct mmc_host *mmc = NULL;
struct mvsd_host *host = NULL;
const struct mbus_dram_target_info *dram;
- struct resource *r;
int ret, irq;
if (!np) {
dev_err(&pdev->dev, "no DT node\n");
return -ENODEV;
}
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_irq(pdev, 0);
- if (!r || irq < 0)
+ if (irq < 0)
return -ENXIO;
mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev);
@@ -758,7 +756,7 @@ static int mvsd_probe(struct platform_device *pdev)
spin_lock_init(&host->lock);
- host->base = devm_ioremap_resource(&pdev->dev, r);
+ host->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host->base)) {
ret = PTR_ERR(host->base);
goto out;
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 12/13] mmc: mtk-sd: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
` (9 preceding siblings ...)
2019-12-15 17:51 ` [PATCH 11/13] mmc: mvsdio: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-15 17:51 ` [PATCH 13/13] mmc: au1xmmc: switch to platform_get_irq Yangtao Li
2019-12-18 2:27 ` [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Chen-Yu Tsai
12 siblings, 0 replies; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/mtk-sd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 010fe29a4888..7726dcf48f2c 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -2194,8 +2194,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
if (ret)
goto host_free;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- host->base = devm_ioremap_resource(&pdev->dev, res);
+ host->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host->base)) {
ret = PTR_ERR(host->base);
goto host_free;
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 13/13] mmc: au1xmmc: switch to platform_get_irq
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
` (10 preceding siblings ...)
2019-12-15 17:51 ` [PATCH 12/13] mmc: mtk-sd: " Yangtao Li
@ 2019-12-15 17:51 ` Yangtao Li
2019-12-18 14:01 ` Ulf Hansson
2019-12-18 2:27 ` [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Chen-Yu Tsai
12 siblings, 1 reply; 19+ messages in thread
From: Yangtao Li @ 2019-12-15 17:51 UTC (permalink / raw)
To: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij
Cc: linux-mmc, linux-kernel, linux-arm-kernel, linux-amlogic,
linux-mediatek, linux-arm-msm, Yangtao Li
platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for
requesting IRQ's resources, as they can be not ready yet. Using
platform_get_irq() instead is preferred for getting IRQ even if it
was not retrieved earlier.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/mmc/host/au1xmmc.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index bc8aeb47a7b4..8823680ca42c 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -984,12 +984,9 @@ static int au1xmmc_probe(struct platform_device *pdev)
goto out2;
}
- r = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!r) {
- dev_err(&pdev->dev, "no IRQ defined\n");
+ host->irq = platform_get_irq(pdev, 0);
+ if (host->irq < 0)
goto out3;
- }
- host->irq = r->start;
mmc->ops = &au1xmmc_ops;
--
2.17.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
` (11 preceding siblings ...)
2019-12-15 17:51 ` [PATCH 13/13] mmc: au1xmmc: switch to platform_get_irq Yangtao Li
@ 2019-12-18 2:27 ` Chen-Yu Tsai
12 siblings, 0 replies; 19+ messages in thread
From: Chen-Yu Tsai @ 2019-12-18 2:27 UTC (permalink / raw)
To: Yangtao Li, Ulf Hansson
Cc: manuel.lauss, Kevin Hilman, chaotian.jing, Matthias Brugger,
nico, Adrian Hunter, Andy Gross, Bjorn Andersson, ben-linux,
Jaehoon Chung, Viresh Kumar, Maxime Ripard, wsa+renesas,
Greg Kroah-Hartman, Kate Stewart, Masahiro Yamada,
Thomas Gleixner, allison, yoshihiro.shimoda.uh, geert+renesas,
Linus Walleij, linux-mmc, linux-kernel, linux-arm-kernel,
open list:ARM/Amlogic Meson...,
moderated list:ARM/Mediatek SoC...,
linux-arm-msm
On Mon, Dec 16, 2019 at 1:51 AM Yangtao Li <tiny.windzz@gmail.com> wrote:
>
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
Acked-by: Chen-Yu Tsai <wens@csie.org>
> drivers/mmc/host/sunxi-mmc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index d577a6b0ceae..f87d7967457f 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -1273,8 +1273,7 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
> if (ret)
> return ret;
>
> - host->reg_base = devm_ioremap_resource(&pdev->dev,
> - platform_get_resource(pdev, IORESOURCE_MEM, 0));
> + host->reg_base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(host->reg_base))
> return PTR_ERR(host->reg_base);
>
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 10/13] mmc: sdhci-msm: convert to devm_platform_ioremap_resource
2019-12-15 17:51 ` [PATCH 10/13] mmc: sdhci-msm: " Yangtao Li
@ 2019-12-18 6:30 ` Bjorn Andersson
2019-12-18 14:01 ` Ulf Hansson
0 siblings, 1 reply; 19+ messages in thread
From: Bjorn Andersson @ 2019-12-18 6:30 UTC (permalink / raw)
To: Yangtao Li
Cc: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, ben-linux, jh80.chung, vireshk,
mripard, wens, wsa+renesas, gregkh, kstewart, yamada.masahiro,
tglx, allison, yoshihiro.shimoda.uh, geert+renesas,
linus.walleij, linux-mmc, linux-kernel, linux-arm-kernel,
linux-amlogic, linux-mediatek, linux-arm-msm
On Sun 15 Dec 09:51 PST 2019, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/mmc/host/sdhci-msm.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index 3d0bb5e2e09b..6daacef4ceec 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -1746,7 +1746,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
> struct sdhci_host *host;
> struct sdhci_pltfm_host *pltfm_host;
> struct sdhci_msm_host *msm_host;
> - struct resource *core_memres;
> struct clk *clk;
> int ret;
> u16 host_version, core_minor;
> @@ -1847,9 +1846,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
> }
>
> if (!msm_host->mci_removed) {
> - core_memres = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> - msm_host->core_mem = devm_ioremap_resource(&pdev->dev,
> - core_memres);
> + msm_host->core_mem = devm_platform_ioremap_resource(pdev, 1);
>
This would now look better without this empty line.
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> if (IS_ERR(msm_host->core_mem)) {
> ret = PTR_ERR(msm_host->core_mem);
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 02/13] mmc: tmio: convert to devm_platform_ioremap_resource
2019-12-15 17:51 ` [PATCH 02/13] mmc: tmio: " Yangtao Li
@ 2019-12-18 9:47 ` Wolfram Sang
0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2019-12-18 9:47 UTC (permalink / raw)
To: Yangtao Li
Cc: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij, linux-mmc, linux-kernel,
linux-arm-kernel, linux-amlogic, linux-mediatek, linux-arm-msm
[-- Attachment #1: Type: text/plain, Size: 449 bytes --]
On Sun, Dec 15, 2019 at 05:51:09PM +0000, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
I am not a big fan of this new function, but oh well...
Tested on a Lager board (R-Car H2), SDHI gets recognized and SD cards
are detected.
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 06/13] mmc: sh_mmcif: convert to devm_platform_ioremap_resource
2019-12-15 17:51 ` [PATCH 06/13] mmc: sh_mmcif: " Yangtao Li
@ 2019-12-18 9:49 ` Wolfram Sang
0 siblings, 0 replies; 19+ messages in thread
From: Wolfram Sang @ 2019-12-18 9:49 UTC (permalink / raw)
To: Yangtao Li
Cc: manuel.lauss, ulf.hansson, khilman, chaotian.jing, matthias.bgg,
nico, adrian.hunter, agross, bjorn.andersson, ben-linux,
jh80.chung, vireshk, mripard, wens, wsa+renesas, gregkh,
kstewart, yamada.masahiro, tglx, allison, yoshihiro.shimoda.uh,
geert+renesas, linus.walleij, linux-mmc, linux-kernel,
linux-arm-kernel, linux-amlogic, linux-mediatek, linux-arm-msm
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
On Sun, Dec 15, 2019 at 05:51:13PM +0000, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Tested on a Lager board (R-Car H2), MMCIF gets recognized and the eMMC
is detected.
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 10/13] mmc: sdhci-msm: convert to devm_platform_ioremap_resource
2019-12-18 6:30 ` Bjorn Andersson
@ 2019-12-18 14:01 ` Ulf Hansson
0 siblings, 0 replies; 19+ messages in thread
From: Ulf Hansson @ 2019-12-18 14:01 UTC (permalink / raw)
To: Bjorn Andersson, Yangtao Li
Cc: linux-mmc, Linux Kernel Mailing List, Linux ARM, linux-mediatek,
Adrian Hunter, Andy Gross
-trimmed cc list
On Wed, 18 Dec 2019 at 07:30, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Sun 15 Dec 09:51 PST 2019, Yangtao Li wrote:
>
> > Use devm_platform_ioremap_resource() to simplify code.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > ---
> > drivers/mmc/host/sdhci-msm.c | 5 +----
> > 1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> > index 3d0bb5e2e09b..6daacef4ceec 100644
> > --- a/drivers/mmc/host/sdhci-msm.c
> > +++ b/drivers/mmc/host/sdhci-msm.c
> > @@ -1746,7 +1746,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
> > struct sdhci_host *host;
> > struct sdhci_pltfm_host *pltfm_host;
> > struct sdhci_msm_host *msm_host;
> > - struct resource *core_memres;
> > struct clk *clk;
> > int ret;
> > u16 host_version, core_minor;
> > @@ -1847,9 +1846,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
> > }
> >
> > if (!msm_host->mci_removed) {
> > - core_memres = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> > - msm_host->core_mem = devm_ioremap_resource(&pdev->dev,
> > - core_memres);
> > + msm_host->core_mem = devm_platform_ioremap_resource(pdev, 1);
> >
>
> This would now look better without this empty line.
Good point, I fixed it when applying. No actions needed.
>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>
[...]
Kind regards
Uffe
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 13/13] mmc: au1xmmc: switch to platform_get_irq
2019-12-15 17:51 ` [PATCH 13/13] mmc: au1xmmc: switch to platform_get_irq Yangtao Li
@ 2019-12-18 14:01 ` Ulf Hansson
0 siblings, 0 replies; 19+ messages in thread
From: Ulf Hansson @ 2019-12-18 14:01 UTC (permalink / raw)
To: Yangtao Li; +Cc: linux-mmc, Linux Kernel Mailing List, Manuel Lauss
- trimmed cc list (please do that also for any future submissions).
On Sun, 15 Dec 2019 at 18:51, Yangtao Li <tiny.windzz@gmail.com> wrote:
>
> platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for
> requesting IRQ's resources, as they can be not ready yet. Using
> platform_get_irq() instead is preferred for getting IRQ even if it
> was not retrieved earlier.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Patch 1->13 applied for next, thanks!
Next time, please use a cover-letter when you send a series.
Kind regards
Uffe
> ---
> drivers/mmc/host/au1xmmc.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
> index bc8aeb47a7b4..8823680ca42c 100644
> --- a/drivers/mmc/host/au1xmmc.c
> +++ b/drivers/mmc/host/au1xmmc.c
> @@ -984,12 +984,9 @@ static int au1xmmc_probe(struct platform_device *pdev)
> goto out2;
> }
>
> - r = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> - if (!r) {
> - dev_err(&pdev->dev, "no IRQ defined\n");
> + host->irq = platform_get_irq(pdev, 0);
> + if (host->irq < 0)
> goto out3;
> - }
> - host->irq = r->start;
>
> mmc->ops = &au1xmmc_ops;
>
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2019-12-18 14:02 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-15 17:51 ` [PATCH 02/13] mmc: tmio: " Yangtao Li
2019-12-18 9:47 ` Wolfram Sang
2019-12-15 17:51 ` [PATCH 03/13] mmc: meson-mx-sdio: " Yangtao Li
2019-12-15 17:51 ` [PATCH 04/13] mmc: sdhci-s3c: " Yangtao Li
2019-12-15 17:51 ` [PATCH 05/13] mmc: sdhci-spear: " Yangtao Li
2019-12-15 17:51 ` [PATCH 06/13] mmc: sh_mmcif: " Yangtao Li
2019-12-18 9:49 ` Wolfram Sang
2019-12-15 17:51 ` [PATCH 07/13] mmc: sdhci_f_sdh30: " Yangtao Li
2019-12-15 17:51 ` [PATCH 08/13] mmc: sdhci_am654: " Yangtao Li
2019-12-15 17:51 ` [PATCH 09/13] mmc: sdhci-milbeaut: " Yangtao Li
2019-12-15 17:51 ` [PATCH 10/13] mmc: sdhci-msm: " Yangtao Li
2019-12-18 6:30 ` Bjorn Andersson
2019-12-18 14:01 ` Ulf Hansson
2019-12-15 17:51 ` [PATCH 11/13] mmc: mvsdio: " Yangtao Li
2019-12-15 17:51 ` [PATCH 12/13] mmc: mtk-sd: " Yangtao Li
2019-12-15 17:51 ` [PATCH 13/13] mmc: au1xmmc: switch to platform_get_irq Yangtao Li
2019-12-18 14:01 ` Ulf Hansson
2019-12-18 2:27 ` [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Chen-Yu Tsai
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).