diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-02-05 16:43:36 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-02-10 14:58:36 +0300 |
commit | 046e14afb3561523efd0047c35c20793ae5f8848 (patch) | |
tree | 8415079a104325b2c9a750a212b2fe66220584a9 /include/linux/gpio | |
parent | bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9 (diff) | |
download | linux-046e14afb3561523efd0047c35c20793ae5f8848.tar.xz |
gpio: Avoid kernel.h inclusion where it's possible
Inclusion of kernel.h increases the mess with the header dependencies.
Avoid kernel.h inclusion where it's possible.
Besides that, clean up a bit other inclusions inside GPIO subsystem headers.
It includes:
- removal pin control bits (forward declaration and header) from linux/gpio.h
- removal of.h from asm-generic/gpio.h
- use of explicit headers in gpio/consumer.h
- add FIXME note with regard to gpio.h inclusion in of_gpio,h
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200205134336.20197-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r-- | include/linux/gpio/consumer.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index bf2d017dd7b7..0a72fccf60ff 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -2,9 +2,10 @@ #ifndef __LINUX_GPIO_CONSUMER_H #define __LINUX_GPIO_CONSUMER_H +#include <linux/bits.h> #include <linux/bug.h> +#include <linux/compiler_types.h> #include <linux/err.h> -#include <linux/kernel.h> struct device; @@ -189,6 +190,8 @@ struct gpio_desc *devm_fwnode_gpiod_get_index(struct device *dev, #else /* CONFIG_GPIOLIB */ +#include <linux/kernel.h> + static inline int gpiod_count(struct device *dev, const char *con_id) { return 0; |