Skip to content
Commit 33a68e86 authored by Linus Walleij's avatar Linus Walleij
Browse files

gpio: reference count the gpio device for each desc



Every time a descriptor is retrieved from the gpiolib, we issue
module_get() to reference count the module supplying the GPIOs.
We also need to call device_get() and device_put() as we also
reference the backing gpio_device when doing this.

Since the sysfs GPIO interface is using gpiod_get() this will
also reference count the sysfs requests until all GPIOs are
unexported.

Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent fdeb8e15
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment