Bartosz Golaszewski dd26ffaa4d gpiolib: unduplicate chip guard in set_config path
We don't need to guard the GPIO chip until its first dereference in
gpio_do_set_config().

First: change the prototype of gpio_do_set_config() to take the GPIO
line descriptor as argument, then move the gpio_chip protection into it
and drop it in two places where it's done too early.

This has the added benefit of making gpio_go_set_config() safe to use
from outside of this compilation unit without taking the gdev SRCU read
lock and will come in handy when we'll want to make it available to the
character device code.

Reviewed-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20241018-gpio-notify-in-kernel-events-v5-2-c79135e58a1c@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-10-22 08:59:08 +02:00
..
2024-10-21 09:23:20 +02:00
2024-10-17 08:53:34 +02:00
2021-04-14 10:19:22 +01:00
2024-10-21 09:23:34 +02:00
2023-10-13 08:39:30 +02:00
2021-05-05 16:07:41 +02:00
2022-10-26 14:52:01 +02:00
2024-07-15 17:53:24 -07:00
2022-10-08 09:46:29 -07:00
2023-08-21 10:39:58 +02:00
2023-03-06 12:33:02 +02:00
2024-09-04 09:02:44 +02:00
2023-08-29 10:21:56 -07:00
2019-12-09 10:40:18 +01:00
2024-09-30 10:16:26 +02:00