mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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>
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user