gpiolib: cdev: use blocking notifier call chain instead of atomic

Replace usage of atomic_notifier_call_chain with
blocking_notifier_call_chain as the notifier function,
lineinfo_changed_notify, calls gpio_desc_to_lineinfo,
which calls pinctrl_gpio_can_use_line, which can sleep.

The chain isn't being called from an atomic context so the
the blocking notifier is a suitable substitute.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
Kent Gibson
2020-07-08 12:15:51 +08:00
committed by Bartosz Golaszewski
parent 0cdc85a371
commit 6accc376a7
3 changed files with 20 additions and 20 deletions

View File

@@ -56,7 +56,7 @@ struct gpio_device {
const char *label;
void *data;
struct list_head list;
struct atomic_notifier_head notifier;
struct blocking_notifier_head notifier;
#ifdef CONFIG_PINCTRL
/*