]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
iio: light: tsl2583: Fix module unloading
authorShreeya Patel <shreeya.patel@collabora.com>
Fri, 26 Aug 2022 12:23:52 +0000 (17:53 +0530)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 28 Nov 2022 14:18:05 +0000 (15:18 +0100)
commit0215668c11f4627549328d4930079cf2dc782d95
tree69d5bb48e64d2702556d078378b69add8f5e4a21
parent653d37412f991923ea09764bd574bf755f0b11c7
iio: light: tsl2583: Fix module unloading

BugLink: https://bugs.launchpad.net/bugs/1997981
commit 0dec4d2f2636b9e54d9d29f17afc7687c5407f78 upstream.

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: 371894f5d1a0 ("iio: tsl2583: add runtime power management support")
Signed-off-by: Shreeya Patel <shreeya.patel@collabora.com>
Link: https://lore.kernel.org/r/20220826122352.288438-1-shreeya.patel@collabora.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/iio/light/tsl2583.c