Files
eternalwrt-mt798x/target/linux/sunxi/patches-6.18/120-pinctrl-sunxi-dt-fix-pins-calculation-on-re-probe.patch
T
2026-05-07 09:47:38 +08:00

16 lines
446 B
Diff

--- a/drivers/pinctrl/sunxi/pinctrl-sunxi-dt.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi-dt.c
@@ -81,6 +81,12 @@ static struct sunxi_desc_pin *init_pins_
int i, j;
/*
+ * Ensure desc->npins is zeroed before accumulation to avoid
+ * double-counting when the same desc is reused on a re-probe.
+ */
+ desc->npins = 0;
+
+ /*
* Find the total number of pins.
* Also work out how much memory we need to store all the pin names.
*/