LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
To: David Brownell <david-b@pacbell.net>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] Protect pca953x from being unloaded while its GPIOs are in use
Date: Fri, 8 Feb 2008 12:10:33 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0802081203280.5301@axis700.grange> (raw)

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)

                 reply	other threads:[~2008-02-08 11:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0802081203280.5301@axis700.grange \
    --to=g.liakhovetski@pengutronix.de \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 2/2] Protect pca953x from being unloaded while its GPIOs are in use' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).