Skip to content

Commit 0fe5063

Browse files
author
Bartosz Golaszewski
committed
gpio: shared: assign the correct firmware node for reset-gpio use-case
When we defer probe due to unlucky timing of adding the lookup table, we assign the matching firmware node to the shared reference for the future probing. However, the fwnode we assign is wrong so fix it and assign the one associated with the reset-gpio device. Fixes: 4941648 ("gpio: shared: allow sharing a reset-gpios pin between reset-gpio and gpiolib") Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Closes: https://lore.kernel.org/all/00107523-7737-4b92-a785-14ce4e93b8cb@samsung.com/ Tested-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20260106-gpio-shared-fixes-v2-1-c7091d2f7581@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
1 parent 20cf2ae commit 0fe5063

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpio/gpiolib-shared.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static bool gpio_shared_dev_is_reset_gpio(struct device *consumer,
417417
* Reuse the fwnode of the real device, next time we'll use it
418418
* in the normal path.
419419
*/
420-
ref->fwnode = fwnode_handle_get(real_ref->fwnode);
420+
ref->fwnode = fwnode_handle_get(reset_fwnode);
421421
return true;
422422
}
423423

0 commit comments

Comments
 (0)