Protect pca953x from being unloaded while its GPIOs are in use
PATCH 2/2 Protect pca953x from being unloaded while its GPIOs are in use
This uses the newly introduced owner field in struct gpio_chip to protect pca953x from being unloaded as long as its GPIOs are in use.
Signed-off-by Guennadi Liakhovetski <[email protected]>
---
drivers/gpio/pca953x.c +1 -0
@@ -188,6 +188,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)