+ gpiolib-i2c-spi-drivers-handle-rmmod-better.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     gpiolib: i2c/spi drivers: handle rmmod better
has been added to the -mm tree.  Its filename is
     gpiolib-i2c-spi-drivers-handle-rmmod-better.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: gpiolib: i2c/spi drivers: handle rmmod better
From: Guennadi Liakhovetski <g.liakhovetski@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
[ add mcp23s08 and pcf857x ]
Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/gpio/mcp23s08.c |    1 +
 drivers/gpio/pca953x.c  |    1 +
 drivers/gpio/pcf857x.c  |    1 +
 3 files changed, 3 insertions(+)

diff -puN drivers/gpio/mcp23s08.c~gpiolib-i2c-spi-drivers-handle-rmmod-better drivers/gpio/mcp23s08.c
--- a/drivers/gpio/mcp23s08.c~gpiolib-i2c-spi-drivers-handle-rmmod-better
+++ a/drivers/gpio/mcp23s08.c
@@ -239,6 +239,7 @@ static int mcp23s08_probe(struct spi_dev
 	mcp->chip.base = pdata->base;
 	mcp->chip.ngpio = 8;
 	mcp->chip.can_sleep = 1;
+	mcp->chip.owner = THIS_MODULE;
 
 	spi_set_drvdata(spi, mcp);
 
diff -puN drivers/gpio/pca953x.c~gpiolib-i2c-spi-drivers-handle-rmmod-better drivers/gpio/pca953x.c
--- a/drivers/gpio/pca953x.c~gpiolib-i2c-spi-drivers-handle-rmmod-better
+++ a/drivers/gpio/pca953x.c
@@ -188,6 +188,7 @@ static void pca953x_setup_gpio(struct pc
 	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)
diff -puN drivers/gpio/pcf857x.c~gpiolib-i2c-spi-drivers-handle-rmmod-better drivers/gpio/pcf857x.c
--- a/drivers/gpio/pcf857x.c~gpiolib-i2c-spi-drivers-handle-rmmod-better
+++ a/drivers/gpio/pcf857x.c
@@ -159,6 +159,7 @@ static int pcf857x_probe(struct i2c_clie
 
 	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
_

Patches currently in -mm which might be from g.liakhovetski@xxxxxxxxxxxxxx are

origin.patch
lib-scatterlisto-needed-by-a-module-only-link-it-in-unconditionally.patch
git-dvb.patch
gpiolib-better-rmmod-infrastructure.patch
gpiolib-i2c-spi-drivers-handle-rmmod-better.patch
gpio-define-gpio_is_valid.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux