[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1577101466.3.0@crapouillou.net>
Date: Mon, 23 Dec 2019 12:44:26 +0100
From: Paul Cercueil <paul@...pouillou.net>
To: Yangtao Li <tiny.windzz@...il.com>
Cc: ssantosh@...nel.org, matthias.bgg@...il.com, rogerq@...com,
tony@...mide.com, lukasz.luba@....com, kgene@...nel.org,
krzk@...nel.org, thierry.reding@...il.com, jonathanh@...dia.com,
allison@...utok.net, tglx@...utronix.de, yong.wu@...iatek.com,
jroedel@...e.de, evgreen@...omium.org, rfontana@...hat.com,
digetx@...il.com, pdeschrijver@...dia.com, john@...ozen.org,
alexios.zavras@...el.com, sboyd@...nel.org,
kstewart@...uxfoundation.org, info@...ux.net,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-omap@...r.kernel.org,
linux-pm@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-tegra@...r.kernel.org
Subject: Re: [PATCH 2/9] memory: jz4780_nemc: convert to
devm_platform_ioremap_resource
Hi,
Le dim., déc. 22, 2019 at 18:50, Yangtao Li <tiny.windzz@...il.com> a
écrit :
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
Acked-by: Paul Cercueil <paul@...pouillou.net>
Cheers,
-Paul
> ---
> drivers/memory/jz4780-nemc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/memory/jz4780-nemc.c
> b/drivers/memory/jz4780-nemc.c
> index b232ed279fc3..857a9fa5cba5 100644
> --- a/drivers/memory/jz4780-nemc.c
> +++ b/drivers/memory/jz4780-nemc.c
> @@ -269,7 +269,6 @@ static int jz4780_nemc_probe(struct
> platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct jz4780_nemc *nemc;
> - struct resource *res;
> struct device_node *child;
> const __be32 *prop;
> unsigned int bank;
> @@ -287,8 +286,7 @@ static int jz4780_nemc_probe(struct
> platform_device *pdev)
> spin_lock_init(&nemc->lock);
> nemc->dev = dev;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - nemc->base = devm_ioremap_resource(dev, res);
> + nemc->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(nemc->base)) {
> dev_err(dev, "failed to get I/O memory\n");
> return PTR_ERR(nemc->base);
> --
> 2.17.1
>
Powered by blists - more mailing lists