* [PATCH] mmc: mxs: use devm_platform_ioremap_resource() to simplify code
@ 2019-07-17 8:52 Anson.Huang
2019-07-17 10:23 ` Aisheng Dong
2019-07-22 13:43 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Anson.Huang @ 2019-07-17 8:52 UTC (permalink / raw)
To: ulf.hansson, shawnguo, s.hauer, kernel, festevam, linus.walleij,
stefan.wahren, kstewart, tglx, linux-mmc, linux-arm-kernel,
linux-kernel
Cc: Linux-imx
From: Anson Huang <Anson.Huang@nxp.com>
Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
drivers/mmc/host/mxs-mmc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index b334e81..78e7e35 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -571,7 +571,6 @@ static int mxs_mmc_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
struct mxs_mmc_host *host;
struct mmc_host *mmc;
- struct resource *iores;
int ret = 0, irq_err;
struct regulator *reg_vmmc;
struct mxs_ssp *ssp;
@@ -587,8 +586,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
host = mmc_priv(mmc);
ssp = &host->ssp;
ssp->dev = &pdev->dev;
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ssp->base = devm_ioremap_resource(&pdev->dev, iores);
+ ssp->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ssp->base)) {
ret = PTR_ERR(ssp->base);
goto out_mmc_free;
--
2.7.4
_______________________________________________
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] 3+ messages in thread
* RE: [PATCH] mmc: mxs: use devm_platform_ioremap_resource() to simplify code
2019-07-17 8:52 [PATCH] mmc: mxs: use devm_platform_ioremap_resource() to simplify code Anson.Huang
@ 2019-07-17 10:23 ` Aisheng Dong
2019-07-22 13:43 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Aisheng Dong @ 2019-07-17 10:23 UTC (permalink / raw)
To: Anson Huang, ulf.hansson, shawnguo, s.hauer, kernel, festevam,
linus.walleij, stefan.wahren, kstewart, tglx, linux-mmc,
linux-arm-kernel, linux-kernel
Cc: dl-linux-imx
> From: Anson.Huang@nxp.com <Anson.Huang@nxp.com>
> Sent: Wednesday, July 17, 2019 4:53 PM
>
> Use the new helper devm_platform_ioremap_resource() which wraps the
> platform_get_resource() and devm_ioremap_resource() together, to simplify
> the code.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Regards
Aisheng
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: mxs: use devm_platform_ioremap_resource() to simplify code
2019-07-17 8:52 [PATCH] mmc: mxs: use devm_platform_ioremap_resource() to simplify code Anson.Huang
2019-07-17 10:23 ` Aisheng Dong
@ 2019-07-22 13:43 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2019-07-22 13:43 UTC (permalink / raw)
To: Anson Huang
Cc: Stefan Wahren, Kate Stewart, Shawn Guo, Sascha Hauer, linux-mmc,
Linux Kernel Mailing List, dl-linux-imx, Sascha Hauer,
Thomas Gleixner, Fabio Estevam, Linus Walleij, Linux ARM
On Wed, 17 Jul 2019 at 11:02, <Anson.Huang@nxp.com> wrote:
>
> From: Anson Huang <Anson.Huang@nxp.com>
>
> Use the new helper devm_platform_ioremap_resource() which wraps the
> platform_get_resource() and devm_ioremap_resource() together, to
> simplify the code.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/mxs-mmc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
> index b334e81..78e7e35 100644
> --- a/drivers/mmc/host/mxs-mmc.c
> +++ b/drivers/mmc/host/mxs-mmc.c
> @@ -571,7 +571,6 @@ static int mxs_mmc_probe(struct platform_device *pdev)
> struct device_node *np = pdev->dev.of_node;
> struct mxs_mmc_host *host;
> struct mmc_host *mmc;
> - struct resource *iores;
> int ret = 0, irq_err;
> struct regulator *reg_vmmc;
> struct mxs_ssp *ssp;
> @@ -587,8 +586,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
> host = mmc_priv(mmc);
> ssp = &host->ssp;
> ssp->dev = &pdev->dev;
> - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - ssp->base = devm_ioremap_resource(&pdev->dev, iores);
> + ssp->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(ssp->base)) {
> ret = PTR_ERR(ssp->base);
> goto out_mmc_free;
> --
> 2.7.4
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-22 13:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 8:52 [PATCH] mmc: mxs: use devm_platform_ioremap_resource() to simplify code Anson.Huang
2019-07-17 10:23 ` Aisheng Dong
2019-07-22 13:43 ` Ulf Hansson
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).