[PATCH] iio: light: tsl2583: Fix module unloading

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

 



tsl2583 uses devm_iio_device_register() function and
calling iio_device_unregister() in remove breaks the
module unloading.
Fix this by removing call to iio_device_unregister()
from tsl2583_remove().

Signed-off-by: Shreeya Patel <shreeya.patel@xxxxxxxxxxxxx>
---
 drivers/iio/light/tsl2583.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/iio/light/tsl2583.c b/drivers/iio/light/tsl2583.c
index 82662dab87c0..36c25f79e6a6 100644
--- a/drivers/iio/light/tsl2583.c
+++ b/drivers/iio/light/tsl2583.c
@@ -878,8 +878,6 @@ static int tsl2583_remove(struct i2c_client *client)
 	struct iio_dev *indio_dev = i2c_get_clientdata(client);
 	struct tsl2583_chip *chip = iio_priv(indio_dev);
 
-	iio_device_unregister(indio_dev);
-
 	pm_runtime_disable(&client->dev);
 	pm_runtime_set_suspended(&client->dev);
 
-- 
2.30.2




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux