projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c366c76
)
gpio: remember to finally free gpio_device
author
Linus Walleij
<linus.walleij@linaro.org>
Tue, 9 Feb 2016 13:27:42 +0000
(14:27 +0100)
committer
Linus Walleij
<linus.walleij@linaro.org>
Thu, 11 Feb 2016 17:16:53 +0000
(18:16 +0100)
When the device core reference count for the device goes to
0 and it calls .release() we free resources and so can also
finally free up the GPIO state container, struct gpio_device.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpio/gpiolib.c
b/drivers/gpio/gpiolib.c
index 70e0fff0a8a7b951a767d86ac354471ccc5a9431..36f8be3f910b61799e271bcc4de9435e93a9fd48 100644
(file)
--- a/
drivers/gpio/gpiolib.c
+++ b/
drivers/gpio/gpiolib.c
@@
-405,6
+405,7
@@
static void gpiodevice_release(struct device *dev)
cdev_del(&gdev->chrdev);
list_del(&gdev->list);
ida_simple_remove(&gpio_ida, gdev->id);
+ kfree(gdev);
}
/**