diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-07-13 12:04:00 (GMT) |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-07-14 08:42:57 (GMT) |
commit | d291d5f692f3fe90de08cea3f1c14ebd80da89ce (patch) | |
tree | e0f4cdc58e0c4922e2f211a37c8e45cd689f8485 /drivers/staging/iio/light | |
parent | 165d0c52fe87f8a95fcc01391432a659915bd332 (diff) | |
download | linux-d291d5f692f3fe90de08cea3f1c14ebd80da89ce.tar.xz |
staging:iio:tsl2x7x: Ensure request_irq and free_irq dev_id parameter match
The data parameters for request_irq and free_irq have to match, otherwise the
IRQ wont be freed.
The issue has been discovered using the following coccinelle patch:
// <smpl>
@r1@
type T;
T data;
@@
(
request_irq(..., (void *)data)
|
request_irq(..., data)
|
request_threaded_irq(..., (void *)data)
|
request_threaded_irq(..., data)
)
@r2@
type r1.T;
T data;
position p;
@@
(
free_irq@p(..., (void *)data)
|
free_irq@p(..., data)
)
@depends on r1@
position p != r2.p;
@@
*free_irq@p(...)
// </smpl>
Cc: Jon Brenner <jbrenner@taosinc.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/light')
-rw-r--r-- | drivers/staging/iio/light/tsl2x7x_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c index 7944686..497a977 100644 --- a/drivers/staging/iio/light/tsl2x7x_core.c +++ b/drivers/staging/iio/light/tsl2x7x_core.c @@ -2029,13 +2029,12 @@ static int tsl2x7x_resume(struct device *dev) static int __devexit tsl2x7x_remove(struct i2c_client *client) { struct iio_dev *indio_dev = i2c_get_clientdata(client); - struct tsl2X7X_chip *chip = iio_priv(indio_dev); tsl2x7x_chip_off(indio_dev); iio_device_unregister(indio_dev); if (client->irq) - free_irq(client->irq, chip->client->name); + free_irq(client->irq, indio_dev); iio_device_free(indio_dev); |