linux-stable/drivers/misc/lis3lv02d
Hans de Goede b1b9f7a494 misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback
The lis3lv02d_i2c driver was missing a line to set the lis3_dev's
reg_ctrl callback.

lis3_reg_ctrl(on) is called from the init callback, but due to
the missing reg_ctrl callback the regulators where never turned off
again leading to the following oops/backtrace when detaching the driver:

[   82.313527] ------------[ cut here ]------------
[   82.313546] WARNING: CPU: 1 PID: 1724 at drivers/regulator/core.c:2396 _regulator_put+0x219/0x230
...
[   82.313695] RIP: 0010:_regulator_put+0x219/0x230
...
[   82.314767] Call Trace:
[   82.314770]  <TASK>
[   82.314772]  ? _regulator_put+0x219/0x230
[   82.314777]  ? __warn+0x81/0x170
[   82.314784]  ? _regulator_put+0x219/0x230
[   82.314791]  ? report_bug+0x18d/0x1c0
[   82.314801]  ? handle_bug+0x3c/0x80
[   82.314806]  ? exc_invalid_op+0x13/0x60
[   82.314812]  ? asm_exc_invalid_op+0x16/0x20
[   82.314845]  ? _regulator_put+0x219/0x230
[   82.314857]  regulator_bulk_free+0x39/0x60
[   82.314865]  i2c_device_remove+0x22/0xb0

Add the missing setting of the callback so that the regulators
properly get turned off again when not used.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231224183402.95640-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:14 +01:00
..
Kconfig Merge 5.2-rc4 into char-misc-next 2019-06-09 09:11:21 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
lis3lv02d.c misc: Explicitly include correct DT includes 2023-08-04 15:39:04 +02:00
lis3lv02d.h misc: lis3lv02d: Make lis3lv02d_remove_fs() return void 2021-10-13 14:35:20 +02:00
lis3lv02d_i2c.c misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback 2024-01-04 17:01:14 +01:00
lis3lv02d_spi.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00