FAILED: patch "[PATCH] iio: temperature: ltc2983: Fix n_wires default bypassing" failed to apply to 5.15-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 434c150752675f44dc52c384a7fa22e5176bc35a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026071314-ruckus-bacterium-2228@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 434c150752675f44dc52c384a7fa22e5176bc35a Mon Sep 17 00:00:00 2001
From: Liviu Stan <[email protected]>
Date: Mon, 25 May 2026 19:39:28 +0300
Subject: [PATCH] iio: temperature: ltc2983: Fix n_wires default bypassing
rotation check
When adi,number-of-wires is absent, n_wires is left at 0. The binding documents a default of 2 wires, matching the hardware default. However the current-rotate validation checks n_wires == 2 || n_wires == 3, so with n_wires = 0 the guard is bypassed and adi,current-rotate is accepted for a 2-wire RTD.
Initialize n_wires = 2 to match the binding default and ensure the rotation check fires correctly when the property is absent.
drivers/iio/temperature/ltc2983.c +1 -1
@@ -741,7 +741,7 @@ ltc2983_rtd_new(const struct fwnode_handle *child, struct ltc2983_data *st,struct ltc2983_rtd *rtd;int ret =0 ;struct device *dev = &st->spi->dev; -u32 excitation_current =0 , n_wires =0 ; +u32 excitation_current =0 , n_wires =2 ; rtd =devm_kzalloc (dev,sizeof (*rtd),GFP_KERNEL );if (!rtd)
PATCH 1/1 iio: temperature: ltc2983: Fix n_wires default bypassing rotation check
When adi,number-of-wires is absent, n_wires is left at 0. The binding documents a default of 2 wires, matching the hardware default. However the current-rotate validation checks n_wires == 2 || n_wires == 3, so with n_wires = 0 the guard is bypassed and adi,current-rotate is accepted for a 2-wire RTD.
Initialize n_wires = 2 to match the binding default and ensure the rotation check fires correctly when the property is absent.
--- drivers/iio/temperature/ltc2983.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/temperature/ltc2983.c +1 -1
@@ -697,7 +697,7 @@ static struct ltc2983_sensor *ltc2983_rtd_new(const struct device_node *child,int ret =0 ;struct device *dev = &st->spi->dev;struct device_node *phandle; -u32 excitation_current =0 , n_wires =0 ; +u32 excitation_current =0 , n_wires =2 ; rtd =devm_kzalloc (dev,sizeof (*rtd),GFP_KERNEL );if (!rtd)
Signature · 1 line
2.43.0
Re: [PATCH 5.15.y] iio: temperature: ltc2983: Fix n_wires default bypassing rotation check
Quoted 2 lines
Initialize
n_wires= 2 to match the binding default and ensure the rotation check fires correctly when the property is absent.
Queued for 5.15, thanks.
Signature · 2 lines
Thanks, Sasha