summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib-cdev.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-08-17 14:59:05 +0300
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-08-21 16:57:05 +0300
commita067419ba77da830939852758702388f0fba09a1 (patch)
tree387593531b96b4c5a2bd0c6d6c7cc8cc2ddc514a /drivers/gpio/gpiolib-cdev.c
parente82bbd6761f7e313141c4033ebb79e3d397b6a9c (diff)
downloadlinux-a067419ba77da830939852758702388f0fba09a1.tar.xz
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 <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Kent Gibson <warthog618@gmail.com>
Diffstat (limited to 'drivers/gpio/gpiolib-cdev.c')
-rw-r--r--drivers/gpio/gpiolib-cdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 91bdd3b928b5..fec446510028 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -2748,4 +2748,5 @@ int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt)
void gpiolib_cdev_unregister(struct gpio_device *gdev)
{
cdev_device_del(&gdev->chrdev, &gdev->dev);
+ blocking_notifier_call_chain(&gdev->device_notifier, 0, NULL);
}