gpio: add the can_sleep flag to struct gpio_device
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Sat, 27 Jan 2024 21:14:15 +0000 (22:14 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 12 Feb 2024 09:51:26 +0000 (10:51 +0100)
commit8a5b477bb3e9c891eb064accabb3162ccf2c590e
treeaf33f7af9dbaf2594ab1a8fa25bd2e463cb676f3
parentc5cf334dcc78185da08b1f5df2d754cc7bf02669
gpio: add the can_sleep flag to struct gpio_device

Duplicating the can_sleep value in GPIO device will allow us to not
needlessly dereference the chip pointer in several places and reduce the
number of SRCU read-only critical sections.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.h