[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdV7syxxtnHEcgFBrf5DLo-M_71tZFWHHQ6kTO=2A1eVhg@mail.gmail.com>
Date: Mon, 7 Oct 2019 09:30:50 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Chris Packham <chris.packham@...iedtelesis.co.nz>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
rayagonda.kokatanur@...adcom.com, li.jin@...adcom.com,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Marc Zyngier <maz@...nel.org>
Subject: Re: [PATCH v2 2/2] pinctrl: iproc: use unique name for irq chip
Hi Chris,
CC MarcZ
On Thu, Oct 3, 2019 at 2:03 AM Chris Packham
<chris.packham@...iedtelesis.co.nz> wrote:
> Use the dev_name(dev) for the irqc->name so that we get unique names
> when we have multiple instances of this driver.
>
> Signed-off-by: Chris Packham <chris.packham@...iedtelesis.co.nz>
A while ago, Marc Zyngier pointed out that the irq_chip .name field
should contain the device's class name, not the instance's name.
Hence the current code is correct?
See also "[PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent"
(https://lore.kernel.org/lkml/20190607095858.10028-1-geert+renesas@glider.be/)
Note that the irqchip patches in that series have been applied; the gpio
patches haven't been applied yet.
> --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
> +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
> @@ -858,7 +858,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
> struct gpio_irq_chip *girq;
>
> irqc = &chip->irqchip;
> - irqc->name = "bcm-iproc-gpio";
> + irqc->name = dev_name(dev);
> irqc->irq_ack = iproc_gpio_irq_ack;
> irqc->irq_mask = iproc_gpio_irq_mask;
> irqc->irq_unmask = iproc_gpio_irq_unmask;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists