diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-02-08 19:07:28 +0200 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-03-06 12:33:02 +0200 |
commit | 380c7ba3923c6e471aff0f951a6cf42e8dec2c79 (patch) | |
tree | 32daa149c3a99fe642d1819568794018395da42e /include/linux/gpio.h | |
parent | 5b1911976ccf83e892452afb0363500228b35d81 (diff) |
gpiolib: Clean up headers
There is a few things done:
- include only the headers we are direct user of
- when pointer is in use, provide a forward declaration
- add missing headers
- group generic headers and subsystem headers
- sort each group alphabetically
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'include/linux/gpio.h')
-rw-r--r-- | include/linux/gpio.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index a86953696e47..8528353e073b 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h @@ -12,9 +12,10 @@ #ifndef __LINUX_GPIO_H #define __LINUX_GPIO_H -#include <linux/errno.h> #include <linux/types.h> +struct device; + /* see Documentation/driver-api/gpio/legacy.rst */ /* make these flag values available regardless of GPIO kconfig options */ @@ -134,19 +135,16 @@ void gpio_free_array(const struct gpio *array, size_t num); /* CONFIG_GPIOLIB: bindings for managed devices that want to request gpios */ -struct device; - int devm_gpio_request(struct device *dev, unsigned gpio, const char *label); int devm_gpio_request_one(struct device *dev, unsigned gpio, unsigned long flags, const char *label); #else /* ! CONFIG_GPIOLIB */ -#include <linux/bug.h> #include <linux/kernel.h> -struct device; -struct gpio_chip; +#include <asm/bug.h> +#include <asm/errno.h> static inline bool gpio_is_valid(int number) { |