Message ID | 20191215175120.3290-2-tiny.windzz@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource | expand |
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>
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);
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(-)