From d72cbed0c486e3db8b56380635f8e845073ce63a Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Mon, 28 Apr 2008 02:14:45 -0700 Subject: 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 [ add mcp23s08 and pcf857x ] Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/gpio/pcf857x.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpio/pcf857x.c') diff --git a/drivers/gpio/pcf857x.c b/drivers/gpio/pcf857x.c index c6b3b537838..1106aa15ac7 100644 --- a/drivers/gpio/pcf857x.c +++ b/drivers/gpio/pcf857x.c @@ -159,6 +159,7 @@ static int pcf857x_probe(struct i2c_client *client) gpio->chip.base = pdata->gpio_base; gpio->chip.can_sleep = 1; + gpio->chip.owner = THIS_MODULE; /* NOTE: the OnSemi jlc1562b is also largely compatible with * these parts, notably for output. It has a low-resolution -- cgit v1.2.3-70-g09d2