This is a note to let you know that I've just added the patch titled regulator: tps65219: Fix matching interrupts for their regulators to the 6.1-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: regulator-tps65219-fix-matching-interrupts-for-their-regulators.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From f050e56de80591fee55bedbdf5b6b998c740cd0c Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> Date: Sun, 7 May 2023 16:46:56 +0200 Subject: regulator: tps65219: Fix matching interrupts for their regulators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> commit f050e56de80591fee55bedbdf5b6b998c740cd0c upstream. The driver's probe() first registers regulators in a loop and then in a second loop passes them as irq data to the interrupt handlers. However the function to get the regulator for given name tps65219_get_rdev_by_name() was a no-op due to argument passed by value, not pointer, thus the second loop assigned always same value - from previous loop. The interrupts, when fired, where executed with wrong data. Compiler also noticed it: drivers/regulator/tps65219-regulator.c: In function ‘tps65219_get_rdev_by_name’: drivers/regulator/tps65219-regulator.c:292:60: error: parameter ‘dev’ set but not used [-Werror=unused-but-set-parameter] Fixes: c12ac5fc3e0a ("regulator: drivers: Add TI TPS65219 PMIC regulators support") Cc: <stable@xxxxxxxxxxxxxxx Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx Reviewed-by: Markus Schneider-Pargmann <msp@xxxxxxxxxxxx Link: https://lore.kernel.org/r/20230507144656.192800-1-krzysztof.kozlowski@xxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/regulator/tps65219-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/regulator/tps65219-regulator.c +++ b/drivers/regulator/tps65219-regulator.c @@ -289,13 +289,13 @@ static irqreturn_t tps65219_regulator_ir static int tps65219_get_rdev_by_name(const char *regulator_name, struct regulator_dev *rdevtbl[7], - struct regulator_dev *dev) + struct regulator_dev **dev) { int i; for (i = 0; i < ARRAY_SIZE(regulators); i++) { if (strcmp(regulator_name, regulators[i].name) == 0) { - dev = rdevtbl[i]; + *dev = rdevtbl[i]; return 0; } } @@ -348,7 +348,7 @@ static int tps65219_regulator_probe(stru irq_data[i].dev = tps->dev; irq_data[i].type = irq_type; - tps65219_get_rdev_by_name(irq_type->regulator_name, rdevtbl, rdev); + tps65219_get_rdev_by_name(irq_type->regulator_name, rdevtbl, &rdev); if (IS_ERR(rdev)) { dev_err(tps->dev, "Failed to get rdev for %s\n", irq_type->regulator_name); Patches currently in stable-queue which might be from krzysztof.kozlowski@xxxxxxxxxx are queue-6.1/w1-w1_therm-fix-locking-behavior-in-convert_t.patch queue-6.1/arm-dts-qcom-msm8974-do-not-use-underscore-in-node-n.patch queue-6.1/memory-brcmstb_dpfe-fix-testing-array-offset-after-u.patch queue-6.1/arm64-dts-qcom-msm8916-correct-camss-unit-address.patch queue-6.1/arm64-dts-qcom-msm8994-correct-spmi-unit-address.patch queue-6.1/arm64-dts-qcom-sm8350-correct-dma-controller-unit-ad.patch queue-6.1/arm-dts-qcom-ipq4019-fix-broken-nand-controller-properties-override.patch queue-6.1/arm64-dts-qcom-msm8916-correct-mmc-unit-address.patch queue-6.1/arm64-dts-qcom-sdm845-correct-camss-unit-address.patch queue-6.1/arm64-dts-microchip-sparx5-do-not-use-psci-on-refere.patch queue-6.1/arm64-dts-qcom-msm8996-correct-camss-unit-address.patch queue-6.1/arm64-dts-qcom-sm8350-add-gpi-dma-compatible-fallbac.patch queue-6.1/regulator-tps65219-fix-matching-interrupts-for-their-regulators.patch queue-6.1/nfc-llcp-fix-possible-use-of-uninitialized-variable-.patch queue-6.1/arm64-dts-qcom-sdm845-polaris-add-missing-touchscree.patch queue-6.1/w1-fix-loop-in-w1_fini.patch queue-6.1/arm64-dts-qcom-sdm630-correct-camss-unit-address.patch queue-6.1/arm64-dts-qcom-apq8096-fix-fixed-regulator-name-prop.patch