mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +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 While at it, fix some awkward indentations. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
		
							parent
							
								
									52ee7c02f6
								
							
						
					
					
						commit
						08a149c40b
					
				
					 6 changed files with 26 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -8,7 +8,19 @@
 | 
			
		|||
#ifndef GPIOLIB_ACPI_H
 | 
			
		||||
#define GPIOLIB_ACPI_H
 | 
			
		||||
 | 
			
		||||
#include <linux/err.h>
 | 
			
		||||
#include <linux/errno.h>
 | 
			
		||||
#include <linux/types.h>
 | 
			
		||||
 | 
			
		||||
#include <linux/gpio/consumer.h>
 | 
			
		||||
 | 
			
		||||
struct acpi_device;
 | 
			
		||||
struct device;
 | 
			
		||||
struct fwnode_handle;
 | 
			
		||||
 | 
			
		||||
struct gpio_chip;
 | 
			
		||||
struct gpio_desc;
 | 
			
		||||
struct gpio_device;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * struct acpi_gpio_info - ACPI GPIO specific information
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,8 +3,17 @@
 | 
			
		|||
#ifndef GPIOLIB_OF_H
 | 
			
		||||
#define GPIOLIB_OF_H
 | 
			
		||||
 | 
			
		||||
#include <linux/err.h>
 | 
			
		||||
#include <linux/errno.h>
 | 
			
		||||
#include <linux/types.h>
 | 
			
		||||
 | 
			
		||||
#include <linux/notifier.h>
 | 
			
		||||
 | 
			
		||||
struct device;
 | 
			
		||||
 | 
			
		||||
struct gpio_chip;
 | 
			
		||||
enum of_gpio_flags;
 | 
			
		||||
struct gpio_desc;
 | 
			
		||||
struct gpio_device;
 | 
			
		||||
 | 
			
		||||
#ifdef CONFIG_OF_GPIO
 | 
			
		||||
struct gpio_desc *of_find_gpio(struct device *dev,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,6 +5,8 @@
 | 
			
		|||
 | 
			
		||||
#ifdef CONFIG_GPIO_SYSFS
 | 
			
		||||
 | 
			
		||||
struct gpio_device;
 | 
			
		||||
 | 
			
		||||
int gpiochip_sysfs_register(struct gpio_device *gdev);
 | 
			
		||||
void gpiochip_sysfs_unregister(struct gpio_device *gdev);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -98,9 +98,9 @@ int devm_gpio_request_one(struct device *dev, unsigned gpio,
 | 
			
		|||
 | 
			
		||||
#else /* ! CONFIG_GPIOLIB */
 | 
			
		||||
 | 
			
		||||
#include <linux/bug.h>
 | 
			
		||||
#include <linux/kernel.h>
 | 
			
		||||
#include <linux/types.h>
 | 
			
		||||
#include <linux/bug.h>
 | 
			
		||||
 | 
			
		||||
struct device;
 | 
			
		||||
struct gpio_chip;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,8 +7,8 @@
 | 
			
		|||
#include <linux/irqchip/chained_irq.h>
 | 
			
		||||
#include <linux/irqdomain.h>
 | 
			
		||||
#include <linux/lockdep.h>
 | 
			
		||||
#include <linux/pinctrl/pinctrl.h>
 | 
			
		||||
#include <linux/pinctrl/pinconf-generic.h>
 | 
			
		||||
#include <linux/pinctrl/pinctrl.h>
 | 
			
		||||
#include <linux/property.h>
 | 
			
		||||
#include <linux/types.h>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,6 @@
 | 
			
		|||
#define __LINUX_GPIO_MACHINE_H
 | 
			
		||||
 | 
			
		||||
#include <linux/types.h>
 | 
			
		||||
#include <linux/list.h>
 | 
			
		||||
 | 
			
		||||
enum gpio_lookup_flags {
 | 
			
		||||
	GPIO_ACTIVE_HIGH		= (0 << 0),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue