diff options
| author | Bartosz Golaszewski <[email protected]> | 2025-03-17 07:27:10 +0000 |
|---|---|---|
| committer | Bartosz Golaszewski <[email protected]> | 2025-03-17 07:27:10 +0000 |
| commit | 496fa7462275fc118f342e2e880bf7309d675bfd (patch) | |
| tree | a0687740ed24af5e1eedc5fae2733a4b7c248153 /drivers/gpio/gpiolib.c | |
| parent | Merge tag 'intel-gpio-v6.15-1' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
| parent | Linux 6.14-rc7 (diff) | |
| download | kernel-496fa7462275fc118f342e2e880bf7309d675bfd.tar.gz kernel-496fa7462275fc118f342e2e880bf7309d675bfd.zip | |
Merge tag 'v6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into gpio/for-next
Linux 6.14-rc7
Diffstat (limited to 'drivers/gpio/gpiolib.c')
| -rw-r--r-- | drivers/gpio/gpiolib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index e5eb3f0ee071..b8197502a5ac 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1075,7 +1075,8 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, } } - ATOMIC_INIT_NOTIFIER_HEAD(&gdev->line_state_notifier); + rwlock_init(&gdev->line_state_lock); + RAW_INIT_NOTIFIER_HEAD(&gdev->line_state_notifier); BLOCKING_INIT_NOTIFIER_HEAD(&gdev->device_notifier); ret = init_srcu_struct(&gdev->srcu); @@ -4361,8 +4362,9 @@ EXPORT_SYMBOL_GPL(gpiod_set_array_value_cansleep); void gpiod_line_state_notify(struct gpio_desc *desc, unsigned long action) { - atomic_notifier_call_chain(&desc->gdev->line_state_notifier, - action, desc); + guard(read_lock_irqsave)(&desc->gdev->line_state_lock); + + raw_notifier_call_chain(&desc->gdev->line_state_notifier, action, desc); } /** |
