xtensa: register gpio chip before use
Platform initialization sets up the LED heartbeat that is controlled via GPIO. Requesting the GPIO pins fails, however, as the chip is only initialized later by a device_initcall(). Fix this up by exporting the initialization function. Let the platform set up the chip before it starts using it. Signed-off-by: Johannes Weiner <jw@emlix.com> Signed-off-by: Chris Zankel <chris@zankel.net>
This commit is contained in:

committed by
Chris Zankel

parent
586411dcd1
commit
1fb137c1e3
@@ -64,8 +64,7 @@ static struct gpio_chip gpiochip = {
|
||||
.exported = 0, /* no exporting to userspace */
|
||||
};
|
||||
|
||||
static int gpio_init(void)
|
||||
int s6_gpio_init(void)
|
||||
{
|
||||
return gpiochip_add(&gpiochip);
|
||||
}
|
||||
device_initcall(gpio_init);
|
||||
|
Reference in New Issue
Block a user