LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 2/2] Protect pca953x from being unloaded while its GPIOs are in use
@ 2008-02-08 11:10 Guennadi Liakhovetski
0 siblings, 0 replies; only message in thread
From: Guennadi Liakhovetski @ 2008-02-08 11:10 UTC (permalink / raw)
To: David Brownell; +Cc: linux-kernel
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 <g.liakhovetski@pengutronix.de>
---
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index 0bd594d..89cee66 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-08 11:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-08 11:10 [PATCH 2/2] Protect pca953x from being unloaded while its GPIOs are in use Guennadi Liakhovetski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).