Commit 84043826 authored by Shreeya Patel's avatar Shreeya Patel Committed by Lipeng Sang
Browse files

iio: light: tsl2583: Fix module unloading

stable inclusion
from stable-v5.10.153
commit af236da8552ecbe0ecb779411611826e87d7a831
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=af236da8552ecbe0ecb779411611826e87d7a831



--------------------------------

commit 0dec4d2f 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: 371894f5 ("iio: tsl2583: add runtime power management support")
Signed-off-by: default avatarShreeya 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: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent 27bc2b07
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment