aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/mcp23s08.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>2008-04-28 05:14:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:34 -0400
commitd72cbed0c486e3db8b56380635f8e845073ce63a (patch)
tree8739c1078f970a2acdb24fd3f2b94c68c89dd3b5 /drivers/gpio/mcp23s08.c
parent438d8908b379b6322fc3b28d45c9ebdddf58bc20 (diff)
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/mcp23s08.c')
-rw-r--r--drivers/gpio/mcp23s08.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/mcp23s08.c b/drivers/gpio/mcp23s08.c
index bb60e8c1a1f0..7fb5b9d009d4 100644
--- a/drivers/gpio/mcp23s08.c
+++ b/drivers/gpio/mcp23s08.c
@@ -239,6 +239,7 @@ static int mcp23s08_probe(struct spi_device *spi)
239 mcp->chip.base = pdata->base; 239 mcp->chip.base = pdata->base;
240 mcp->chip.ngpio = 8; 240 mcp->chip.ngpio = 8;
241 mcp->chip.can_sleep = 1; 241 mcp->chip.can_sleep = 1;
242 mcp->chip.owner = THIS_MODULE;
242 243
243 spi_set_drvdata(spi, mcp); 244 spi_set_drvdata(spi, mcp);
244 245