[PATCH] gpio: shared: restore the atomic set_bit() lost in a merge
From: Sasha Levin
Date: Thu Nov 26 2026 - 18:17:09 EST
The v7.4-rc4 merge into gpio/for-next took the for-next version of
gpio_shared_setup_entry(), which commit cda42ff53c4b ("gpio: shared:
factor out per-entry setup helper") had moved out of
gpiochip_setup_shared(). That dropped the change from
commit 7d1d799d6251 ("gpio: shared: use atomic set_bit() for descriptor
flags"), so GPIOD_FLAG_SHARED is set with __set_bit() again, and merging
gpio/for-next into mainline would undo it.
Use set_bit() as mainline does. linux-next has the same change as a
fixup in its gpio-brgl merge.
Fixes: 45b9f0f3fcb3 ("Merge tag 'v7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into gpio/for-next")
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
On top of gpio/for-next 0a74985977e8. Built gpiolib-shared.o with an
arm64 defconfig and W=1.
drivers/gpio/gpiolib-shared.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c
index 62c3d8a6abdcf..7f8b31ce4b9ec 100644
--- a/drivers/gpio/gpiolib-shared.c
+++ b/drivers/gpio/gpiolib-shared.c
@@ -588,7 +588,7 @@ static int gpio_shared_setup_entry(struct gpio_chip *gc,
desc = &gdev->descs[entry->offset];
- __set_bit(GPIOD_FLAG_SHARED, &desc->flags);
+ set_bit(GPIOD_FLAG_SHARED, &desc->flags);
/*
* Shared GPIOs are not requested via the normal path. Make
* them inaccessible to anyone even before we register the
base-commit: 0a74985977e851196d69e5364f4787adb03a5fb5
--
2.53.0