[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9bbcce19c777583815c92ce3c2ff2586@www.loen.fr>
Date: Thu, 17 Oct 2019 09:23:34 +0100
From: Marc Zyngier <maz@...nel.org>
To: Daode Huang <huangdaode@...ilicon.com>
Cc: <jason@...edaemon.net>, <andrew@...n.ch>,
<gregory.clement@...tlin.com>, <sebastian.hesselbarth@...il.com>,
<tglx@...utronix.de>, <mcoquelin.stm32@...il.com>,
<alexandre.torgue@...com>, <nm@...com>, <t-kristo@...com>,
<ssantosh@...nel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>
Subject: Re: [PATCH] use devm_platform_ioremap_resource() for irqchip drivers
On 2019-10-17 08:13, Daode Huang wrote:
> From: Daode Huang <huangdaode@...licon.com>
>
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together
>
> Signed-off-by: Daode Huang <huangdaode@...licon.com>
> ---
> drivers/irqchip/irq-mvebu-icu.c | 3 +--
> drivers/irqchip/irq-mvebu-pic.c | 3 +--
> drivers/irqchip/irq-stm32-exti.c | 3 +--
> drivers/irqchip/irq-ti-sci-inta.c | 3 +--
> drivers/irqchip/irq-ts4800.c | 3 +--
> 5 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/irqchip/irq-mvebu-icu.c
> b/drivers/irqchip/irq-mvebu-icu.c
> index 547045d..ddf9b0d 100644
> --- a/drivers/irqchip/irq-mvebu-icu.c
> +++ b/drivers/irqchip/irq-mvebu-icu.c
> @@ -357,8 +357,7 @@ static int mvebu_icu_probe(struct platform_device
> *pdev)
>
> icu->dev = &pdev->dev;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - icu->base = devm_ioremap_resource(&pdev->dev, res);
> + icu->base = devm_platform_ioremap_resource(pdev, res);
void __iomem *devm_platform_ioremap_resource(struct platform_device
*pdev,
unsigned int index)
What could possibly go wrong? I'd suggest you start compiling (and
possibly
testing) the code you change before sending patches...
M.
--
Jazz is not dead. It just smells funny...
Powered by blists - more mailing lists