diff options
author | Pawel Moll <pawel.moll@arm.com> | 2014-01-30 17:18:57 +0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-02-06 13:33:47 +0400 |
commit | 781f6d710d4482eab05cfaad50060a0ea8c0e4e0 (patch) | |
tree | b4ebc7c5d301d7a1e759de71af9f7fdd11d870c9 /drivers/gpio/gpio-generic.c | |
parent | b7ab697369716ecf7c5b71114bdd22445f9a7a5e (diff) | |
download | linux-781f6d710d4482eab05cfaad50060a0ea8c0e4e0.tar.xz |
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>
Diffstat (limited to 'drivers/gpio/gpio-generic.c')
-rw-r--r-- | drivers/gpio/gpio-generic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c index d2196bf73847..8c778afdf49f 100644 --- a/drivers/gpio/gpio-generic.c +++ b/drivers/gpio/gpio-generic.c @@ -531,6 +531,8 @@ static int bgpio_pdev_probe(struct platform_device *pdev) return err; if (pdata) { + if (pdata->label) + bgc->gc.label = pdata->label; bgc->gc.base = pdata->base; if (pdata->ngpio > 0) bgc->gc.ngpio = pdata->ngpio; |