Message ID | 20221024080828.3840438-1-jk@codeconstruct.com.au |
---|---|
State | Accepted |
Commit | 6de0cb80e601df16f481a614daa0e84adbf0b552 |
Headers | show |
Series | gpio: ftgpio010: use device name for gpiochip name & label | expand |
On Mon, Oct 24, 2022 at 10:08 AM Jeremy Kerr <jk@codeconstruct.com.au> wrote: > > Currently, we use just the fixed string "FTGPIO010" as the gpiochip name > for ftgpio010 drivers. Because it's fixed, this means we cannot > distinguish multiple ftgpio010 devices present on a single system. > > This change uses the dev_name() instead, which should be unique between > multiple instances. > > Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> > --- > drivers/gpio/gpio-ftgpio010.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpio-ftgpio010.c b/drivers/gpio/gpio-ftgpio010.c > index f77a965f5780..2728672ef9f8 100644 > --- a/drivers/gpio/gpio-ftgpio010.c > +++ b/drivers/gpio/gpio-ftgpio010.c > @@ -277,7 +277,7 @@ static int ftgpio_gpio_probe(struct platform_device *pdev) > dev_err(dev, "unable to init generic GPIO\n"); > goto dis_clk; > } > - g->gc.label = "FTGPIO010"; > + g->gc.label = dev_name(dev); > g->gc.base = -1; > g->gc.parent = dev; > g->gc.owner = THIS_MODULE; > -- > 2.35.1 > Applied, thanks! Bart
diff --git a/drivers/gpio/gpio-ftgpio010.c b/drivers/gpio/gpio-ftgpio010.c index f77a965f5780..2728672ef9f8 100644 --- a/drivers/gpio/gpio-ftgpio010.c +++ b/drivers/gpio/gpio-ftgpio010.c @@ -277,7 +277,7 @@ static int ftgpio_gpio_probe(struct platform_device *pdev) dev_err(dev, "unable to init generic GPIO\n"); goto dis_clk; } - g->gc.label = "FTGPIO010"; + g->gc.label = dev_name(dev); g->gc.base = -1; g->gc.parent = dev; g->gc.owner = THIS_MODULE;
Currently, we use just the fixed string "FTGPIO010" as the gpiochip name for ftgpio010 drivers. Because it's fixed, this means we cannot distinguish multiple ftgpio010 devices present on a single system. This change uses the dev_name() instead, which should be unique between multiple instances. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> --- drivers/gpio/gpio-ftgpio010.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)