gpio: of: clear OF_POPULATED on hog nodes in remove path
commitbbee90e750upstream. The previously set OF_POPULATED flag should be cleared on the hog nodes when removing the chip. Cc: stable@vger.kernel.org Fixes:63636d956c("gpio: of: Add DT overlay support for GPIO hogs") Acked-by: Linus Walleij <linusw@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260309-gpio-hog-fwnode-v2-1-4e61f3dbf06a@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b44cc78ff4
commit
a37435986a
1 changed files with 8 additions and 1 deletions
|
|
@ -1210,7 +1210,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue