diff options
author | Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> | 2008-04-28 02:14:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 08:58:34 -0700 |
commit | d72cbed0c486e3db8b56380635f8e845073ce63a (patch) | |
tree | 8739c1078f970a2acdb24fd3f2b94c68c89dd3b5 /drivers/gpio/pca953x.c | |
parent | 438d8908b379b6322fc3b28d45c9ebdddf58bc20 (diff) | |
download | op-kernel-dev-d72cbed0c486e3db8b56380635f8e845073ce63a.zip op-kernel-dev-d72cbed0c486e3db8b56380635f8e845073ce63a.tar.gz |
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>
Diffstat (limited to 'drivers/gpio/pca953x.c')
-rw-r--r-- | drivers/gpio/pca953x.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 6e72fd3..e0e0af5 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c @@ -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) |