From a067419ba77da830939852758702388f0fba09a1 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Thu, 17 Aug 2023 13:59:05 +0200 Subject: gpiolib: add a second blocking notifier to struct gpio_device Add a new blocking notifier to struct gpio_device and use it to notify subscribers about the GPIO device being unregistered from the device model. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Kent Gibson --- drivers/gpio/gpiolib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpio/gpiolib.c') diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 38640df1d798..8f74e0bb2a5c 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -848,6 +848,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, spin_unlock_irqrestore(&gpio_lock, flags); BLOCKING_INIT_NOTIFIER_HEAD(&gdev->line_state_notifier); + BLOCKING_INIT_NOTIFIER_HEAD(&gdev->device_notifier); init_rwsem(&gdev->sem); #ifdef CONFIG_PINCTRL -- cgit v1.2.3