diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-02-08 20:07:28 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-03-06 13:33:02 +0300 |
commit | 380c7ba3923c6e471aff0f951a6cf42e8dec2c79 (patch) | |
tree | 32daa149c3a99fe642d1819568794018395da42e /drivers | |
parent | 5b1911976ccf83e892452afb0363500228b35d81 (diff) | |
download | linux-380c7ba3923c6e471aff0f951a6cf42e8dec2c79.tar.xz |
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 'drivers')
-rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 10 | ||||
-rw-r--r-- | drivers/gpio/gpiolib-acpi.h | 1 | ||||
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpiolib-of.h | 1 | ||||
-rw-r--r-- | drivers/gpio/gpiolib-swnode.c | 5 | ||||
-rw-r--r-- | drivers/gpio/gpiolib-sysfs.c | 21 | ||||
-rw-r--r-- | drivers/gpio/gpiolib.c | 9 |
7 files changed, 35 insertions, 18 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index d8a421ce26a8..0605399c84e7 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -7,17 +7,19 @@ * Mika Westerberg <mika.westerberg@linux.intel.com> */ +#include <linux/acpi.h> #include <linux/dmi.h> #include <linux/errno.h> -#include <linux/gpio/consumer.h> -#include <linux/gpio/driver.h> -#include <linux/gpio/machine.h> #include <linux/export.h> -#include <linux/acpi.h> #include <linux/interrupt.h> +#include <linux/irq.h> #include <linux/mutex.h> #include <linux/pinctrl/pinctrl.h> +#include <linux/gpio/consumer.h> +#include <linux/gpio/driver.h> +#include <linux/gpio/machine.h> + #include "gpiolib.h" #include "gpiolib-acpi.h" diff --git a/drivers/gpio/gpiolib-acpi.h b/drivers/gpio/gpiolib-acpi.h index 90fd6b04f24d..0fcd7e14d7f9 100644 --- a/drivers/gpio/gpiolib-acpi.h +++ b/drivers/gpio/gpiolib-acpi.h @@ -9,7 +9,6 @@ #define GPIOLIB_ACPI_H #include <linux/err.h> -#include <linux/errno.h> #include <linux/types.h> #include <linux/gpio/consumer.h> diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 0f699af438b0..1436cdb5fa26 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -10,14 +10,16 @@ #include <linux/device.h> #include <linux/err.h> #include <linux/errno.h> -#include <linux/module.h> #include <linux/io.h> -#include <linux/gpio/consumer.h> +#include <linux/module.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/of_gpio.h> #include <linux/pinctrl/pinctrl.h> #include <linux/slab.h> +#include <linux/string.h> + +#include <linux/gpio/consumer.h> #include <linux/gpio/machine.h> #include "gpiolib.h" diff --git a/drivers/gpio/gpiolib-of.h b/drivers/gpio/gpiolib-of.h index e5bb065d82ef..6b3a5347c5d9 100644 --- a/drivers/gpio/gpiolib-of.h +++ b/drivers/gpio/gpiolib-of.h @@ -4,7 +4,6 @@ #define GPIOLIB_OF_H #include <linux/err.h> -#include <linux/errno.h> #include <linux/types.h> #include <linux/notifier.h> diff --git a/drivers/gpio/gpiolib-swnode.c b/drivers/gpio/gpiolib-swnode.c index dd9ccac214d1..b5a6eaf3729b 100644 --- a/drivers/gpio/gpiolib-swnode.c +++ b/drivers/gpio/gpiolib-swnode.c @@ -6,13 +6,14 @@ */ #include <linux/err.h> #include <linux/errno.h> -#include <linux/gpio/consumer.h> -#include <linux/gpio/driver.h> #include <linux/kernel.h> #include <linux/printk.h> #include <linux/property.h> #include <linux/string.h> +#include <linux/gpio/consumer.h> +#include <linux/gpio/driver.h> + #include "gpiolib.h" #include "gpiolib-swnode.h" diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c index 6e4267944f80..c1cbf71329f0 100644 --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c @@ -1,18 +1,29 @@ // SPDX-License-Identifier: GPL-2.0 + +#include <linux/bitops.h> +#include <linux/device.h> #include <linux/idr.h> +#include <linux/init.h> +#include <linux/interrupt.h> +#include <linux/kdev_t.h> +#include <linux/kstrtox.h> +#include <linux/list.h> #include <linux/mutex.h> -#include <linux/device.h> +#include <linux/printk.h> +#include <linux/slab.h> +#include <linux/spinlock.h> +#include <linux/string.h> #include <linux/sysfs.h> +#include <linux/types.h> + #include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> -#include <linux/interrupt.h> -#include <linux/kdev_t.h> -#include <linux/slab.h> -#include <linux/ctype.h> #include "gpiolib.h" #include "gpiolib-sysfs.h" +struct kernfs_node; + #define GPIO_IRQF_TRIGGER_NONE 0 #define GPIO_IRQF_TRIGGER_FALLING BIT(0) #define GPIO_IRQF_TRIGGER_RISING BIT(1) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 19bd23044b01..700195a1faae 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -6,22 +6,25 @@ #include <linux/debugfs.h> #include <linux/device.h> #include <linux/err.h> +#include <linux/errno.h> #include <linux/file.h> #include <linux/fs.h> -#include <linux/gpio.h> -#include <linux/gpio/driver.h> -#include <linux/gpio/machine.h> #include <linux/idr.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/kernel.h> #include <linux/list.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/pinctrl/consumer.h> #include <linux/seq_file.h> #include <linux/slab.h> #include <linux/spinlock.h> +#include <linux/gpio.h> +#include <linux/gpio/driver.h> +#include <linux/gpio/machine.h> + #include <uapi/linux/gpio.h> #include "gpiolib-acpi.h" |