ramips: aw9523: add can_sleep flag for GPIO chip
authorDavid Bauer <mail@david-bauer.net>
Wed, 29 Dec 2021 02:39:44 +0000 (03:39 +0100)
committerDavid Bauer <mail@david-bauer.net>
Wed, 29 Dec 2021 02:43:03 +0000 (03:43 +0100)
The GPIO expander is connected via I2C, thus the can_sleep flag has to
be set to true. This should fix spurious "scheduling while atomic" bugs
in the kernel ringbuffer.

Signed-off-by: David Bauer <mail@david-bauer.net>
target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c

index 182e11cdc6faf6d6ec5507d82e0d76f82b631797..4e75c9bf079d6426b64ba5b2e8f3f8ef04f7c39a 100644 (file)
@@ -822,7 +822,7 @@ static int aw9523_init_gpiochip(struct aw9523 *awi, unsigned int npins)
        gpiochip->parent = dev;
        gpiochip->of_node = dev->of_node;
        gpiochip->owner = THIS_MODULE;
-       gpiochip->can_sleep = false;
+       gpiochip->can_sleep = true;
 
        return 0;
 }