diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-02-11 13:37:48 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-16 02:20:02 +0300 |
commit | 43c54ecade400cf6ca8203f960b525fbe5b73a13 (patch) | |
tree | a21d68b83a3629237c790a69a3d9d461972f07ae /include/linux/gpio | |
parent | 20ec3e39fc12cf3a331ee73eb01d52bddcdd2fa4 (diff) | |
download | linux-43c54ecade400cf6ca8203f960b525fbe5b73a13.tar.xz |
gpio: move the subdriver data pointer into gpio_device
We move to manage this pointer under gpiolib control rather than
leave it in the subdevice's gpio_chip. We can not NULL it after
gpiochip_remove so at to keep things tight.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r-- | include/linux/gpio/driver.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index e2a934ce3e64..b92ab9efdb69 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -25,7 +25,6 @@ struct gpio_device; * @gpiodev: the internal state holder, opaque struct * @parent: optional parent device providing the GPIOs * @owner: helps prevent removal of modules exporting active GPIOs - * @data: per-instance data assigned by the driver * @request: optional hook for chip-specific activation, such as * enabling module power and clock; may sleep * @free: optional hook for chip-specific deactivation, such as @@ -109,7 +108,6 @@ struct gpio_chip { struct gpio_device *gpiodev; struct device *parent; struct module *owner; - void *data; int (*request)(struct gpio_chip *chip, unsigned offset); @@ -202,10 +200,7 @@ void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset); bool gpiochip_line_is_irq(struct gpio_chip *chip, unsigned int offset); /* get driver data */ -static inline void *gpiochip_get_data(struct gpio_chip *chip) -{ - return chip->data; -} +void *gpiochip_get_data(struct gpio_chip *chip); struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc); |