summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib-sysfs.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-02-09 13:51:59 +0100
committerLinus Walleij <linus.walleij@linaro.org>2016-02-11 20:29:45 +0100
commit1c3cdb186172ee3be24005a7ff0e849bc17b67b8 (patch)
tree56802f31391f6f4448579f0525b766fb0379e475 /drivers/gpio/gpiolib-sysfs.c
parentgpio: move sysfs mock device to the gpio_device (diff)
downloadlinux-1c3cdb186172ee3be24005a7ff0e849bc17b67b8.tar.xz
linux-1c3cdb186172ee3be24005a7ff0e849bc17b67b8.zip
gpio: move descriptors into gpio_device
We need gpio_device to hold the descriptors so that they can be lifecycled with the struct gpio_device held from userspace. Move the descriptor array into gpio_device. Also rename it from "desc" (singularis) to "descs" (pluralis) to reflect the fact that it is an array. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib-sysfs.c')
-rw-r--r--drivers/gpio/gpiolib-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index 94ba4bb8b4f8..de65633471af 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
@@ -765,7 +765,7 @@ void gpiochip_sysfs_unregister(struct gpio_device *gdev)
/* unregister gpiod class devices owned by sysfs */
for (i = 0; i < chip->ngpio; i++) {
- desc = &chip->desc[i];
+ desc = &chip->gpiodev->descs[i];
if (test_and_clear_bit(FLAG_SYSFS, &desc->flags))
gpiod_free(desc);
}