FAILED: patch "[PATCH] gpio: of: clear OF_POPULATED on hog nodes in remove path" failed to apply to 5.15-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x bbee90e750262bfb406d66dc65c46d616d2b6673
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051257-twine-stout-440d@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From bbee90e750262bfb406d66dc65c46d616d2b6673 Mon Sep 17 00:00:00 2001
From: Bartosz Golaszewski <[email protected]>
Date: Mon, 9 Mar 2026 13:42:37 +0100
Subject: [PATCH] gpio: of: clear OF_POPULATED on hog nodes in remove path
The previously set OF_POPULATED flag should be cleared on the hog nodes when removing the chip.
drivers/gpio/gpiolib-of.c +8 -1
@@ -1187,7 +1187,14 @@ int of_gpiochip_add(struct gpio_chip *chip)void of_gpiochip_remove (struct gpio_chip *chip) { -of_node_put (dev_of_node (&chip->gpiodev->dev)); +struct device_node *np =dev_of_node (&chip->gpiodev->dev); + +for_each_child_of_node_scoped (np, child) { +if (of_property_present (child,"gpio-hog" )) +of_node_clear_flag (child,OF_POPULATED ); + } + +of_node_put (np); }bool of_gpiochip_instance_match (struct gpio_chip *gc,unsigned int index)