Skip to content

Commit 0dec4d2

Browse files
Shreeya Pateljic23
authored andcommitted
iio: light: tsl2583: Fix module unloading
tsl2583 probe() uses devm_iio_device_register() and calling iio_device_unregister() causes the unregister to occur twice. s Switch to iio_device_register() instead of devm_iio_device_register() in probe to avoid the device managed cleanup. Fixes: 371894f ("iio: tsl2583: add runtime power management support") Signed-off-by: Shreeya Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 9abf231 commit 0dec4d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/light/tsl2583.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ static int tsl2583_probe(struct i2c_client *clientp,
858858
TSL2583_POWER_OFF_DELAY_MS);
859859
pm_runtime_use_autosuspend(&clientp->dev);
860860

861-
ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
861+
ret = iio_device_register(indio_dev);
862862
if (ret) {
863863
dev_err(&clientp->dev, "%s: iio registration failed\n",
864864
__func__);

0 commit comments

Comments
 (0)