Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 781f6d71 authored by Pawel Moll's avatar Pawel Moll Committed by Linus Walleij
Browse files

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: default avatarPawel Moll <pawel.moll@arm.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent b7ab6973
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -531,6 +531,8 @@ static int bgpio_pdev_probe(struct platform_device *pdev)
		return err;
		return err;


	if (pdata) {
	if (pdata) {
		if (pdata->label)
			bgc->gc.label = pdata->label;
		bgc->gc.base = pdata->base;
		bgc->gc.base = pdata->base;
		if (pdata->ngpio > 0)
		if (pdata->ngpio > 0)
			bgc->gc.ngpio = pdata->ngpio;
			bgc->gc.ngpio = pdata->ngpio;
+1 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@
#include <linux/spinlock_types.h>
#include <linux/spinlock_types.h>


struct bgpio_pdata {
struct bgpio_pdata {
	const char *label;
	int base;
	int base;
	int ngpio;
	int ngpio;
};
};