gpiolib: i2c/spi drivers: handle rmmod better
Use the newly introduced owner field in struct gpio_chip to protect the current (small) set of non-SOC GPIO drivers from being unloaded while any of their GPIOs are in use. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> [ add mcp23s08 and pcf857x ] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
438d8908b3
commit
d72cbed0c4
@@ -189,6 +189,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
|
||||
gc->base = chip->gpio_start;
|
||||
gc->ngpio = gpios;
|
||||
gc->label = chip->client->name;
|
||||
gc->owner = THIS_MODULE;
|
||||
}
|
||||
|
||||
static int __devinit pca953x_probe(struct i2c_client *client)
|
||||
|
Reference in New Issue
Block a user