]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: swnode: don't use the swnode's name as the key for GPIO lookup
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 3 Nov 2025 09:35:24 +0000 (10:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:42 +0000 (15:37 -0500)
commit25decf0469d4c91d90aa2e28d996aed276bfc622
treeb19f065a6ef00a9eda6bf3201f223af704994d83
parentff70aa7e8cf05745fdba7258952a8bedf33ea336
gpio: swnode: don't use the swnode's name as the key for GPIO lookup

[ Upstream commit e5d527be7e6984882306b49c067f1fec18920735 ]

Looking up a GPIO controller by label that is the name of the software
node is wonky at best - the GPIO controller driver is free to set
a different label than the name of its firmware node. We're already being
passed a firmware node handle attached to the GPIO device to
swnode_get_gpio_device() so use it instead for a more precise lookup.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Fixes: e7f9ff5dc90c ("gpiolib: add support for software nodes")
Link: https://lore.kernel.org/r/20251103-reset-gpios-swnodes-v4-4-6461800b6775@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/gpiolib-swnode.c