Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: generic: Add label to platform data

When registering more than one platform device, it is
useful to set the gpio chip label in the platform data.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Pawel Moll and committed by
Linus Walleij
781f6d71 b7ab6973

+3
+2
drivers/gpio/gpio-generic.c
··· 531 531 return err; 532 532 533 533 if (pdata) { 534 + if (pdata->label) 535 + bgc->gc.label = pdata->label; 534 536 bgc->gc.base = pdata->base; 535 537 if (pdata->ngpio > 0) 536 538 bgc->gc.ngpio = pdata->ngpio;
+1
include/linux/basic_mmio_gpio.h
··· 19 19 #include <linux/spinlock_types.h> 20 20 21 21 struct bgpio_pdata { 22 + const char *label; 22 23 int base; 23 24 int ngpio; 24 25 };