From 51990e825431089747f8896244b5c17d3a6423f1 Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Sun, 22 Jan 2012 11:23:42 -0500 Subject: device.h: cleanup users outside of linux/include (C files) For files that are actively using linux/device.h, make sure that they call it out. This will allow us to clean up some of the implicit uses of linux/device.h within include/* without introducing build regressions. Yes, this was created by "cheating" -- i.e. the headers were cleaned up, and then the fallout was found and fixed, and then the two commits were reordered. This ensures we don't introduce build regressions into the git history. Signed-off-by: Paul Gortmaker --- drivers/base/power/clock_ops.c | 1 + drivers/base/power/common.c | 1 + drivers/base/power/opp.c | 1 + drivers/base/regmap/regcache-lzo.c | 1 + drivers/base/regmap/regcache-rbtree.c | 1 + drivers/base/regmap/regcache.c | 1 + drivers/base/regmap/regmap-debugfs.c | 1 + drivers/base/regmap/regmap-irq.c | 1 + drivers/base/regmap/regmap.c | 1 + drivers/edac/edac_stub.c | 1 + drivers/edac/mce_amd_inj.c | 1 + drivers/mfd/wm8994-regmap.c | 1 + drivers/power/apm_power.c | 1 + drivers/power/power_supply.h | 4 ++++ drivers/power/power_supply_leds.c | 1 + drivers/power/power_supply_sysfs.c | 1 + net/rfkill/core.c | 1 + sound/core/init.c | 1 + sound/core/pcm.c | 1 + sound/core/seq/seq.c | 1 + sound/core/timer.c | 1 + 21 files changed, 24 insertions(+) diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index 428e55e012dc..869d7ff2227f 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c index 4af7c1cbf909..a14085cc613f 100644 --- a/drivers/base/power/common.c +++ b/drivers/base/power/common.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 95706fa24c73..ac993eafec82 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/base/regmap/regcache-lzo.c b/drivers/base/regmap/regcache-lzo.c index b7d16143edeb..51f6f28dadf1 100644 --- a/drivers/base/regmap/regcache-lzo.c +++ b/drivers/base/regmap/regcache-lzo.c @@ -11,6 +11,7 @@ */ #include +#include #include #include "internal.h" diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c index 32620c4f1683..b487c29a67dc 100644 --- a/drivers/base/regmap/regcache-rbtree.c +++ b/drivers/base/regmap/regcache-rbtree.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 1ead66186b7c..214f704c34db 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 6f397476e27c..8c90a83ae24f 100644 --- a/drivers/base/regmap/regmap-debugfs.c +++ b/drivers/base/regmap/regmap-debugfs.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "internal.h" diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 428836fc5835..1befaa7a31cb 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index be10a4ff6609..87f9e1129ae9 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/drivers/edac/edac_stub.c b/drivers/edac/edac_stub.c index 670c4481453b..6c86f6e54558 100644 --- a/drivers/edac/edac_stub.c +++ b/drivers/edac/edac_stub.c @@ -15,6 +15,7 @@ #include #include #include +#include #include int edac_op_state = EDAC_OPSTATE_INVAL; diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c index 885e8ad8fdcf..66b5151c1080 100644 --- a/drivers/edac/mce_amd_inj.c +++ b/drivers/edac/mce_amd_inj.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c index c598ae69b8ff..0c0a215f3fdd 100644 --- a/drivers/mfd/wm8994-regmap.c +++ b/drivers/mfd/wm8994-regmap.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "wm8994.h" diff --git a/drivers/power/apm_power.c b/drivers/power/apm_power.c index 8a612dec9139..39763015b360 100644 --- a/drivers/power/apm_power.c +++ b/drivers/power/apm_power.c @@ -10,6 +10,7 @@ */ #include +#include #include #include diff --git a/drivers/power/power_supply.h b/drivers/power/power_supply.h index 018de2b26998..cc439fd89d8d 100644 --- a/drivers/power/power_supply.h +++ b/drivers/power/power_supply.h @@ -10,6 +10,10 @@ * You may use this code as per GPL version 2 */ +struct device; +struct device_type; +struct power_supply; + #ifdef CONFIG_SYSFS extern void power_supply_init_attrs(struct device_type *dev_type); diff --git a/drivers/power/power_supply_leds.c b/drivers/power/power_supply_leds.c index da25eb94e5c6..995f966ed5b7 100644 --- a/drivers/power/power_supply_leds.c +++ b/drivers/power/power_supply_leds.c @@ -11,6 +11,7 @@ */ #include +#include #include #include diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index b52b57ca3084..4368e7d61316 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 354760ebbbd2..f974961754ca 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/init.c b/sound/core/init.c index 3ac49b1b7cb8..995fc5d4b1a3 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 8928ca871c22..1888a90bd5b6 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/sound/core/seq/seq.c b/sound/core/seq/seq.c index 9d8379aedf40..712110561082 100644 --- a/sound/core/seq/seq.c +++ b/sound/core/seq/seq.c @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/sound/core/timer.c b/sound/core/timer.c index 8e7561dfc5fc..6ddcf06f52f9 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3-58-ga151 From 313162d0b83836e2f57e51b9b8650fb4b9c396ea Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Mon, 30 Jan 2012 11:46:54 -0500 Subject: device.h: audit and cleanup users in main include dir The header includes a lot of stuff, and it in turn gets a lot of use just for the basic "struct device" which appears so often. Clean up the users as follows: 1) For those headers only needing "struct device" as a pointer in fcn args, replace the include with exactly that. 2) For headers not really using anything from device.h, simply delete the include altogether. 3) For headers relying on getting device.h implicitly before being included themselves, now explicitly include device.h 4) For files in which doing #1 or #2 uncovers an implicit dependency on some other header, fix by explicitly adding the required header(s). Any C files that were implicitly relying on device.h to be present have already been dealt with in advance. Total removals from #1 and #2: 51. Total additions coming from #3: 9. Total other implicit dependencies from #4: 7. As of 3.3-rc1, there were 110, so a net removal of 42 gives about a 38% reduction in device.h presence in include/* Signed-off-by: Paul Gortmaker --- include/linux/amba/pl022.h | 2 -- include/linux/atmdev.h | 2 +- include/linux/attribute_container.h | 3 ++- include/linux/c2port.h | 3 ++- include/linux/cdrom.h | 1 - include/linux/cpu.h | 3 ++- include/linux/cpufreq.h | 1 - include/linux/crash_dump.h | 1 - include/linux/dma-buf.h | 2 +- include/linux/edac.h | 6 +++++- include/linux/fb.h | 1 - include/linux/firewire.h | 3 ++- include/linux/hwmon-sysfs.h | 2 ++ include/linux/hwmon.h | 2 +- include/linux/hwspinlock.h | 2 +- include/linux/ide.h | 3 ++- include/linux/ipmi.h | 2 +- include/linux/ipmi_smi.h | 3 ++- include/linux/jz4740-adc.h | 2 +- include/linux/maple.h | 2 +- include/linux/mfd/abx500.h | 3 ++- include/linux/mfd/abx500/ab5500.h | 2 +- include/linux/mfd/abx500/ab8500.h | 4 +++- include/linux/mfd/pm8xxx/pm8921.h | 1 - include/linux/mfd/stmpe.h | 4 +++- include/linux/mfd/tc3589x.h | 2 +- include/linux/mlx4/driver.h | 1 - include/linux/mmc/card.h | 1 + include/linux/mmc/core.h | 2 +- include/linux/mmc/host.h | 1 + include/linux/netdevice.h | 2 +- include/linux/of_device.h | 3 ++- include/linux/opp.h | 1 + include/linux/phy.h | 5 +++-- include/linux/pm_domain.h | 2 ++ include/linux/power_supply.h | 3 ++- include/linux/regmap.h | 2 +- include/linux/regulator/consumer.h | 3 ++- include/linux/rfkill.h | 2 +- include/linux/rio_drv.h | 1 - include/linux/serial_pnx8xxx.h | 1 - include/linux/spi/mmc_spi.h | 2 +- include/linux/wimax/debug.h | 2 +- include/media/media-device.h | 3 ++- include/media/v4l2-ctrls.h | 1 - include/media/v4l2-ioctl.h | 1 - include/net/mac80211.h | 3 ++- include/scsi/scsi_device.h | 2 +- include/sound/core.h | 5 ++--- include/sound/soc-dapm.h | 3 ++- include/trace/events/regmap.h | 2 +- include/trace/events/rpm.h | 3 ++- include/trace/events/writeback.h | 1 - 53 files changed, 68 insertions(+), 52 deletions(-) diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h index 572f637299c9..9da37a45faf5 100644 --- a/include/linux/amba/pl022.h +++ b/include/linux/amba/pl022.h @@ -25,8 +25,6 @@ #ifndef _SSP_PL022_H #define _SSP_PL022_H -#include - /** * whether SSP is in loopback mode or not */ diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index f4ff882cb2da..52c940935bd1 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h @@ -213,7 +213,6 @@ struct atm_cirange { #ifdef __KERNEL__ -#include #include /* wait_queue_head_t */ #include /* struct timeval */ #include @@ -249,6 +248,7 @@ struct k_atm_dev_stats { struct k_atm_aal_stats aal5; }; +struct device; enum { ATM_VF_ADDR, /* Address is in use. Set by anybody, cleared diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h index c3ab81428c66..896c6892f327 100644 --- a/include/linux/attribute_container.h +++ b/include/linux/attribute_container.h @@ -9,10 +9,11 @@ #ifndef _ATTRIBUTE_CONTAINER_H_ #define _ATTRIBUTE_CONTAINER_H_ -#include #include #include +struct device; + struct attribute_container { struct list_head node; struct klist containers; diff --git a/include/linux/c2port.h b/include/linux/c2port.h index a2f7d7413f30..4efabcb51347 100644 --- a/include/linux/c2port.h +++ b/include/linux/c2port.h @@ -9,11 +9,12 @@ * the Free Software Foundation */ -#include #include #define C2PORT_NAME_LEN 32 +struct device; + /* * C2 port basic structs */ diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index 35eae4b67503..d35a12fbd8f1 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h @@ -910,7 +910,6 @@ struct mode_page_header { #ifdef __KERNEL__ #include /* not really needed, later.. */ -#include #include struct packet_command diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 1f6587590a1a..e3cdc3aec87e 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -14,11 +14,12 @@ #ifndef _LINUX_CPU_H_ #define _LINUX_CPU_H_ -#include #include #include #include +struct device; + struct cpu { int node_id; /* The node which contains the CPU */ int hotpluggable; /* creates sysfs control file if hotpluggable */ diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 6216115c7789..fad1382f8615 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index b936763f2236..37e4f8da7cdf 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h @@ -3,7 +3,6 @@ #ifdef CONFIG_CRASH_DUMP #include -#include #include #include diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index f8ac076afa52..887dcd487062 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -26,11 +26,11 @@ #include #include -#include #include #include #include +struct device; struct dma_buf; struct dma_buf_attachment; diff --git a/include/linux/edac.h b/include/linux/edac.h index 1cd3947987e5..ba317e2930a1 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h @@ -13,7 +13,11 @@ #define _LINUX_EDAC_H_ #include -#include +#include +#include +#include + +struct device; #define EDAC_OPSTATE_INVAL -1 #define EDAC_OPSTATE_POLL 0 diff --git a/include/linux/fb.h b/include/linux/fb.h index c18122f40543..9d509675034a 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -407,7 +407,6 @@ struct fb_cursor { #include #include -#include #include #include #include diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 84ccf8e04fa6..fba45b89689e 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h @@ -2,7 +2,6 @@ #define _LINUX_FIREWIRE_H #include -#include #include #include #include @@ -68,6 +67,8 @@ #define CSR_MODEL 0x17 #define CSR_DIRECTORY_ID 0x20 +struct device; + struct fw_csr_iterator { const u32 *p; const u32 *end; diff --git a/include/linux/hwmon-sysfs.h b/include/linux/hwmon-sysfs.h index a90c09d331c1..1c7b89ae6bdc 100644 --- a/include/linux/hwmon-sysfs.h +++ b/include/linux/hwmon-sysfs.h @@ -20,6 +20,8 @@ #ifndef _LINUX_HWMON_SYSFS_H #define _LINUX_HWMON_SYSFS_H +#include + struct sensor_device_attribute{ struct device_attribute dev_attr; int index; diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h index 6b6ee702b007..82b29ae6ebb0 100644 --- a/include/linux/hwmon.h +++ b/include/linux/hwmon.h @@ -14,7 +14,7 @@ #ifndef _HWMON_H_ #define _HWMON_H_ -#include +struct device; struct device *hwmon_device_register(struct device *dev); diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock.h index aad6bd4b3efd..3343298e40e8 100644 --- a/include/linux/hwspinlock.h +++ b/include/linux/hwspinlock.h @@ -20,12 +20,12 @@ #include #include -#include /* hwspinlock mode argument */ #define HWLOCK_IRQSTATE 0x01 /* Disable interrupts, save state */ #define HWLOCK_IRQ 0x02 /* Disable interrupts, don't save state */ +struct device; struct hwspinlock; struct hwspinlock_device; struct hwspinlock_ops; diff --git a/include/linux/ide.h b/include/linux/ide.h index 501370b61ee5..7afe15f916da 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -43,6 +42,8 @@ #define ERROR_RESET 3 /* Reset controller every 4th retry */ #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ +struct device; + /* Error codes returned in rq->errors to the higher part of the driver. */ enum { IDE_DRV_ERROR_GENERAL = 101, diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index bbd156bb953b..48dcba9b2065 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h @@ -220,10 +220,10 @@ struct kernel_ipmi_msg { * The in-kernel interface. */ #include -#include #include struct module; +struct device; /* Opaque type for a IPMI message user. One of these is needed to send and receive messages. */ diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 3ef0d8b6aa6f..fcb5d44ea635 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h @@ -36,10 +36,11 @@ #include #include -#include #include #include +struct device; + /* This files describes the interface for IPMI system management interface drivers to bind into the IPMI message handler. */ diff --git a/include/linux/jz4740-adc.h b/include/linux/jz4740-adc.h index 9053f95e9687..8184578fbfa4 100644 --- a/include/linux/jz4740-adc.h +++ b/include/linux/jz4740-adc.h @@ -2,7 +2,7 @@ #ifndef __LINUX_JZ4740_ADC #define __LINUX_JZ4740_ADC -#include +struct device; /* * jz4740_adc_set_config - Configure a JZ4740 adc device diff --git a/include/linux/maple.h b/include/linux/maple.h index d9a51b9b3300..c37288b23e0c 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h @@ -1,9 +1,9 @@ #ifndef __LINUX_MAPLE_H #define __LINUX_MAPLE_H -#include #include +struct device; extern struct bus_type maple_bus_type; /* Maple Bus command and response codes */ diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 9970337ff041..e20dd6ead1d0 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h @@ -14,9 +14,10 @@ * Author: Rickard Andersson */ -#include #include +struct device; + #ifndef MFD_ABX500_H #define MFD_ABX500_H diff --git a/include/linux/mfd/abx500/ab5500.h b/include/linux/mfd/abx500/ab5500.h index a720051ae933..54f820ed73bb 100644 --- a/include/linux/mfd/abx500/ab5500.h +++ b/include/linux/mfd/abx500/ab5500.h @@ -6,7 +6,7 @@ #ifndef MFD_AB5500_H #define MFD_AB5500_H -#include +struct device; enum ab5500_devid { AB5500_DEVID_ADC, diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 838c6b487cc5..dca94396190d 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h @@ -7,7 +7,9 @@ #ifndef MFD_AB8500_H #define MFD_AB8500_H -#include +#include + +struct device; /* * AB8500 bank addresses diff --git a/include/linux/mfd/pm8xxx/pm8921.h b/include/linux/mfd/pm8xxx/pm8921.h index d5517fd32d1b..00fa3de7659d 100644 --- a/include/linux/mfd/pm8xxx/pm8921.h +++ b/include/linux/mfd/pm8xxx/pm8921.h @@ -18,7 +18,6 @@ #ifndef __MFD_PM8921_H #define __MFD_PM8921_H -#include #include #define PM8921_NR_IRQS 256 diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h index ca1d7a347600..8c54de674b4b 100644 --- a/include/linux/mfd/stmpe.h +++ b/include/linux/mfd/stmpe.h @@ -8,7 +8,9 @@ #ifndef __LINUX_MFD_STMPE_H #define __LINUX_MFD_STMPE_H -#include +#include + +struct device; enum stmpe_block { STMPE_BLOCK_GPIO = 1 << 0, diff --git a/include/linux/mfd/tc3589x.h b/include/linux/mfd/tc3589x.h index 16c76e124f9c..3acb3a8e3af5 100644 --- a/include/linux/mfd/tc3589x.h +++ b/include/linux/mfd/tc3589x.h @@ -7,7 +7,7 @@ #ifndef __LINUX_MFD_TC3589x_H #define __LINUX_MFD_TC3589x_H -#include +struct device; enum tx3589x_block { TC3589x_BLOCK_GPIO = 1 << 0, diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index e1eebf78caba..5f1298b1b5ef 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h @@ -33,7 +33,6 @@ #ifndef MLX4_DRIVER_H #define MLX4_DRIVER_H -#include #include struct mlx4_dev; diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 9f22ba572de0..895978c9a16b 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -10,6 +10,7 @@ #ifndef LINUX_MMC_CARD_H #define LINUX_MMC_CARD_H +#include #include #include diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 87a976cc5654..2e6a681fceb2 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -9,7 +9,7 @@ #define LINUX_MMC_CORE_H #include -#include +#include struct request; struct mmc_data; diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 0beba1e5e1ed..68558d743da5 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -12,6 +12,7 @@ #include #include +#include #include #include diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0eac07c95255..fa568da2fcda 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -38,7 +38,6 @@ #include #include -#include #include #include #include @@ -56,6 +55,7 @@ #include struct netpoll_info; +struct device; struct phy_device; /* 802.11 specific */ struct wireless_dev; diff --git a/include/linux/of_device.h b/include/linux/of_device.h index ae5638480ef2..b444adf692dd 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -5,10 +5,11 @@ #include /* temporary until merge */ #ifdef CONFIG_OF_DEVICE -#include #include #include +struct device; + extern const struct of_device_id *of_match_device( const struct of_device_id *matches, const struct device *dev); extern void of_device_make_bus_id(struct device *dev); diff --git a/include/linux/opp.h b/include/linux/opp.h index ee94b33080c2..2a4e5faee904 100644 --- a/include/linux/opp.h +++ b/include/linux/opp.h @@ -19,6 +19,7 @@ #include struct opp; +struct device; enum opp_event { OPP_EVENT_ADD, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE, diff --git a/include/linux/phy.h b/include/linux/phy.h index c599f7eca1e7..6fe0a37d4abf 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -19,7 +19,6 @@ #define __PHY_H #include -#include #include #include #include @@ -88,6 +87,9 @@ typedef enum { IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */ #define MII_ADDR_C45 (1<<30) +struct device; +struct sk_buff; + /* * The Bus class for PHYs. Devices which provide access to * PHYs should register using this structure @@ -241,7 +243,6 @@ enum phy_state { PHY_RESUMING }; -struct sk_buff; /* phy_device: An instance of a PHY * diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index a03a0ad998b8..fa2e20b621b0 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -10,6 +10,8 @@ #define _LINUX_PM_DOMAIN_H #include +#include +#include #include enum gpd_status { diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index fa9b962aec12..c38c13db8832 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -13,10 +13,11 @@ #ifndef __LINUX_POWER_SUPPLY_H__ #define __LINUX_POWER_SUPPLY_H__ -#include #include #include +struct device; + /* * All voltages, currents, charges, energies, time and temperatures in uV, * µA, µAh, µWh, seconds and tenths of degree Celsius unless otherwise diff --git a/include/linux/regmap.h b/include/linux/regmap.h index eb93921cdd30..765736cbb509 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -13,10 +13,10 @@ * published by the Free Software Foundation. */ -#include #include struct module; +struct device; struct i2c_client; struct spi_device; diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index f2698a0edfc4..10e0d33e8ff7 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -35,7 +35,8 @@ #ifndef __LINUX_REGULATOR_CONSUMER_H_ #define __LINUX_REGULATOR_CONSUMER_H_ -#include +struct device; +struct notifier_block; /* * Regulator operating modes. diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index c6c608482cba..6fdf02737e9d 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h @@ -117,10 +117,10 @@ enum rfkill_user_states { #include #include #include -#include #include #include +struct device; /* this is opaque */ struct rfkill; diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index 229b3ca23134..7f07470e1ed9 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/include/linux/serial_pnx8xxx.h b/include/linux/serial_pnx8xxx.h index de6c19c7f340..79ad87b0be3e 100644 --- a/include/linux/serial_pnx8xxx.h +++ b/include/linux/serial_pnx8xxx.h @@ -20,7 +20,6 @@ #define _LINUX_SERIAL_PNX8XXX_H #include -#include #define PNX8XXX_NR_PORTS 2 diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h index 0f4eb165f254..32be8dbdf191 100644 --- a/include/linux/spi/mmc_spi.h +++ b/include/linux/spi/mmc_spi.h @@ -1,10 +1,10 @@ #ifndef __LINUX_SPI_MMC_SPI_H #define __LINUX_SPI_MMC_SPI_H -#include #include #include +struct device; struct mmc_host; /* Put this in platform_data of a device being used to manage an MMC/SD diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index 57031b4d12f2..aaf24ba12c4d 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h @@ -154,9 +154,9 @@ #define __debug__h__ #include -#include #include +struct device; /* Backend stuff */ diff --git a/include/media/media-device.h b/include/media/media-device.h index 6a27d916c250..eaade9815bb6 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h @@ -23,7 +23,6 @@ #ifndef _MEDIA_DEVICE_H #define _MEDIA_DEVICE_H -#include #include #include #include @@ -31,6 +30,8 @@ #include #include +struct device; + /** * struct media_device - Media device * @dev: Parent device diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index eeb3df637144..62e04dda22f2 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h @@ -22,7 +22,6 @@ #define _V4L2_CTRLS_H #include -#include #include /* forward references */ diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index 3f5d60fc5df6..032ff21b28bb 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h @@ -11,7 +11,6 @@ #include #include -#include #include #include /* need __user */ #include diff --git a/include/net/mac80211.h b/include/net/mac80211.h index d49928ba5d09..f0605df39e95 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -87,6 +86,8 @@ * */ +struct device; + /** * enum ieee80211_max_queues - maximum number of queues * diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 77273f2fdd80..34dc8315d837 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -1,7 +1,6 @@ #ifndef _SCSI_SCSI_DEVICE_H #define _SCSI_SCSI_DEVICE_H -#include #include #include #include @@ -9,6 +8,7 @@ #include #include +struct device; struct request_queue; struct scsi_cmnd; struct scsi_lun; diff --git a/include/sound/core.h b/include/sound/core.h index 5ab255f196cc..a4207163697e 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -26,7 +26,6 @@ #include /* struct mutex */ #include /* struct rw_semaphore */ #include /* pm_message_t */ -#include #include /* number of supported soundcards */ @@ -39,10 +38,10 @@ #define CONFIG_SND_MAJOR 116 /* standard configuration */ /* forward declarations */ -#ifdef CONFIG_PCI struct pci_dev; -#endif struct module; +struct device; +struct device_attribute; /* device allocation stuff */ diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index d26a9b784772..ab0d84aeae1e 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -13,10 +13,11 @@ #ifndef __LINUX_SND_SOC_DAPM_H #define __LINUX_SND_SOC_DAPM_H -#include #include #include +struct device; + /* widget has no PM register bit */ #define SND_SOC_NOPM -1 diff --git a/include/trace/events/regmap.h b/include/trace/events/regmap.h index 12fbf43524e9..50fe9ba61442 100644 --- a/include/trace/events/regmap.h +++ b/include/trace/events/regmap.h @@ -4,10 +4,10 @@ #if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_REGMAP_H -#include #include #include +struct device; struct regmap; /* diff --git a/include/trace/events/rpm.h b/include/trace/events/rpm.h index d62c558bf64b..33f85b68c22c 100644 --- a/include/trace/events/rpm.h +++ b/include/trace/events/rpm.h @@ -7,7 +7,8 @@ #include #include -#include + +struct device; /* * The rpm_internal events are used for tracing some important diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index 8588a8918023..2d0dd3e03e41 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h @@ -5,7 +5,6 @@ #define _TRACE_WRITEBACK_H #include -#include #include #define show_inode_state(state) \ -- cgit v1.2.3-58-ga151