Patch "misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback" has been added to the 6.6-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     misc-lis3lv02d_i2c-add-missing-setting-of-the-reg_ct.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit dce6a5de5515f34b260c518a30c96fb2ed327dc9
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Sun Dec 24 19:34:02 2023 +0100

    misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback
    
    [ Upstream commit b1b9f7a494400c0c39f8cd83de3aaa6111c55087 ]
    
    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@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231224183402.95640-1-hdegoede@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
index 3882e97e96a7..c6eb27d46cb0 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
@@ -150,6 +150,7 @@ static int lis3lv02d_i2c_probe(struct i2c_client *client)
 	lis3_dev.init	  = lis3_i2c_init;
 	lis3_dev.read	  = lis3_i2c_read;
 	lis3_dev.write	  = lis3_i2c_write;
+	lis3_dev.reg_ctrl = lis3_reg_ctrl;
 	lis3_dev.irq	  = client->irq;
 	lis3_dev.ac	  = lis3lv02d_axis_map;
 	lis3_dev.pm_dev	  = &client->dev;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux