diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-09-12 18:16:31 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-09-15 08:04:42 -0400 |
commit | d47529b2e9fe0ec2eb1f072afad8849f52e385c4 (patch) | |
tree | e3a175e093454ff2aea2ded26977ff40bf8d6ddd | |
parent | 39d80072222428aaf73276c6fd66185e6f622bd9 (diff) |
gpio: don't include module.h in shared driver header
Most shared headers in include/linux don't need to know what the
internals of a struct module are; all they care about is that it
is a struct and hence they may require a pointer to one.
The advantage in this is that module.h is including a lot of stuff
itself, and an otherwise empty C file that just contains module.h
will result in ~750kB from CPP (compared to say 12kB from init.h)
So we have approximately 50 instances of "struct module;" in the
various include/linux headers already that help us keep module.h
out of other headers; here we do the same for gpio.
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | include/linux/gpio/driver.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 50882e09289b..216e6f275aa8 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/module.h> | ||
7 | #include <linux/irq.h> | 6 | #include <linux/irq.h> |
8 | #include <linux/irqchip/chained_irq.h> | 7 | #include <linux/irqchip/chained_irq.h> |
9 | #include <linux/irqdomain.h> | 8 | #include <linux/irqdomain.h> |
@@ -16,6 +15,7 @@ struct of_phandle_args; | |||
16 | struct device_node; | 15 | struct device_node; |
17 | struct seq_file; | 16 | struct seq_file; |
18 | struct gpio_device; | 17 | struct gpio_device; |
18 | struct module; | ||
19 | 19 | ||
20 | #ifdef CONFIG_GPIOLIB | 20 | #ifdef CONFIG_GPIOLIB |
21 | 21 | ||