gpiolib: add support for scope-based management to gpio_device
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 27 Sep 2023 14:29:22 +0000 (16:29 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 4 Oct 2023 11:29:16 +0000 (13:29 +0200)
commit9e4555d1e54a18946d7ca363b9fc8ed1fe7dfde4
tree798bd9cd20a12752d6682bf37432c00e75855154
parent36aa129f221c9070afd8dff03154ab49702a5b1b
gpiolib: add support for scope-based management to gpio_device

As the few users that need to get the reference to the GPIO device often
release it right after inspecting its properties, let's add support for
the automatic reference release to struct gpio_device.

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