commit | 33a68e86fd7741f782c71a0daa9111b352e94445 | [log] [tgz] |
---|---|---|
author | Linus Walleij <linus.walleij@linaro.org> | Thu Feb 11 10:28:44 2016 +0100 |
committer | Linus Walleij <linus.walleij@linaro.org> | Thu Feb 11 20:29:46 2016 +0100 |
tree | 96e6ee9894a0513d98e43300dd17bec0a45e36a4 | |
parent | fdeb8e1547cb9dd39d5d7223b33f3565cf86c28e [diff] |
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: Linus Walleij <linus.walleij@linaro.org>