diff options
| author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2025-10-23 12:29:06 +0200 |
|---|---|---|
| committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2025-11-03 00:02:32 +0100 |
| commit | 1cb053ea2e1dedd8f2d9653b7c3ca5b93c8c9275 (patch) | |
| tree | ea967c22769f596fba62242b5c5e094741615e26 /tools/lib/python/abi/helpers.py | |
| parent | 8ed6b8842c44a4a716dfd536e7f13aff77039a02 (diff) | |
power: supply: max77705: Fix potential IRQ chip conflict when probing two devices
MAX77705 charger is most likely always a single device on the board,
however nothing stops board designers to have two of them, thus same
device driver could probe twice. Or user could manually try to probing
second time.
Device driver is not ready for that case, because it allocates
statically 'struct regmap_irq_chip' as non-const and stores during
probe in 'irq_drv_data' member a pointer to per-probe state
container ('struct max77705_charger_data'). devm_regmap_add_irq_chip()
does not make a copy of 'struct regmap_irq_chip' but stores the pointer.
Second probe - either successful or failure - would overwrite the
'irq_drv_data' from previous device probe, so interrupts would be
executed in a wrong context.
Fixes: a6a494c8e3ce ("power: supply: max77705: Add charger driver for Maxim 77705")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20251023102905.71535-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'tools/lib/python/abi/helpers.py')
0 files changed, 0 insertions, 0 deletions
