]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
device.h: audit and cleanup users in main include dir
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 30 Jan 2012 16:46:54 +0000 (11:46 -0500)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 16 Mar 2012 14:38:24 +0000 (10:38 -0400)
The <linux/device.h> 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 <paul.gortmaker@windriver.com>
53 files changed:
include/linux/amba/pl022.h
include/linux/atmdev.h
include/linux/attribute_container.h
include/linux/c2port.h
include/linux/cdrom.h
include/linux/cpu.h
include/linux/cpufreq.h
include/linux/crash_dump.h
include/linux/dma-buf.h
include/linux/edac.h
include/linux/fb.h
include/linux/firewire.h
include/linux/hwmon-sysfs.h
include/linux/hwmon.h
include/linux/hwspinlock.h
include/linux/ide.h
include/linux/ipmi.h
include/linux/ipmi_smi.h
include/linux/jz4740-adc.h
include/linux/maple.h
include/linux/mfd/abx500.h
include/linux/mfd/abx500/ab5500.h
include/linux/mfd/abx500/ab8500.h
include/linux/mfd/pm8xxx/pm8921.h
include/linux/mfd/stmpe.h
include/linux/mfd/tc3589x.h
include/linux/mlx4/driver.h
include/linux/mmc/card.h
include/linux/mmc/core.h
include/linux/mmc/host.h
include/linux/netdevice.h
include/linux/of_device.h
include/linux/opp.h
include/linux/phy.h
include/linux/pm_domain.h
include/linux/power_supply.h
include/linux/regmap.h
include/linux/regulator/consumer.h
include/linux/rfkill.h
include/linux/rio_drv.h
include/linux/serial_pnx8xxx.h
include/linux/spi/mmc_spi.h
include/linux/wimax/debug.h
include/media/media-device.h
include/media/v4l2-ctrls.h
include/media/v4l2-ioctl.h
include/net/mac80211.h
include/scsi/scsi_device.h
include/sound/core.h
include/sound/soc-dapm.h
include/trace/events/regmap.h
include/trace/events/rpm.h
include/trace/events/writeback.h

index 572f637299c9ae72f8a82700543825b47b09217e..9da37a45faf53de5d84f60fda34ed8e6eec27c3a 100644 (file)
@@ -25,8 +25,6 @@
 #ifndef _SSP_PL022_H
 #define _SSP_PL022_H
 
-#include <linux/device.h>
-
 /**
  * whether SSP is in loopback mode or not
  */
index f4ff882cb2daa864d5e0e0c318783229ebf5d9f5..52c940935bd19f77a065cd43959baadfeefa53e6 100644 (file)
@@ -213,7 +213,6 @@ struct atm_cirange {
 
 #ifdef __KERNEL__
 
-#include <linux/device.h>
 #include <linux/wait.h> /* wait_queue_head_t */
 #include <linux/time.h> /* struct timeval */
 #include <linux/net.h>
@@ -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
index c3ab81428c6624ffaf7e93612f42654e7c570176..896c6892f327848ed195f8f7cb7b7181ae353557 100644 (file)
@@ -9,10 +9,11 @@
 #ifndef _ATTRIBUTE_CONTAINER_H_
 #define _ATTRIBUTE_CONTAINER_H_
 
-#include <linux/device.h>
 #include <linux/list.h>
 #include <linux/klist.h>
 
+struct device;
+
 struct attribute_container {
        struct list_head        node;
        struct klist            containers;
index a2f7d7413f30534f039f902405faaf8be7e4a921..4efabcb5134712db3a2be5994d1fada80911eb11 100644 (file)
@@ -9,11 +9,12 @@
  * the Free Software Foundation
  */
 
-#include <linux/device.h>
 #include <linux/kmemcheck.h>
 
 #define C2PORT_NAME_LEN                        32
 
+struct device;
+
 /*
  * C2 port basic structs
  */
index 35eae4b675038a6f13ae0b0cfe33fc28d656049e..d35a12fbd8f11c85728733d7a3c3ffb6c4346370 100644 (file)
@@ -910,7 +910,6 @@ struct mode_page_header {
 
 #ifdef __KERNEL__
 #include <linux/fs.h>          /* not really needed, later.. */
-#include <linux/device.h>
 #include <linux/list.h>
 
 struct packet_command
index 1f6587590a1afedf4a8c7478fde3d41a7de9d4e0..e3cdc3aec87e7430d019266d36e0a52b27e95a70 100644 (file)
 #ifndef _LINUX_CPU_H_
 #define _LINUX_CPU_H_
 
-#include <linux/device.h>
 #include <linux/node.h>
 #include <linux/compiler.h>
 #include <linux/cpumask.h>
 
+struct device;
+
 struct cpu {
        int node_id;            /* The node which contains the CPU */
        int hotpluggable;       /* creates sysfs control file if hotpluggable */
index 6216115c7789aa6198aea1c5d904e6dedec2840a..fad1382f8615234a5a6b26d69b52367ad2f02343 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/mutex.h>
 #include <linux/notifier.h>
 #include <linux/threads.h>
-#include <linux/device.h>
 #include <linux/kobject.h>
 #include <linux/sysfs.h>
 #include <linux/completion.h>
index b936763f2236be16254d23380e49d99f08f82dc4..37e4f8da7cdf81deefacf7d7b19175e98d2063a6 100644 (file)
@@ -3,7 +3,6 @@
 
 #ifdef CONFIG_CRASH_DUMP
 #include <linux/kexec.h>
-#include <linux/device.h>
 #include <linux/proc_fs.h>
 #include <linux/elf.h>
 
index f8ac076afa52c211c50621e4d01101becce7bc4b..887dcd487062d5f892a968056a6c339e8d6d7623 100644 (file)
 
 #include <linux/file.h>
 #include <linux/err.h>
-#include <linux/device.h>
 #include <linux/scatterlist.h>
 #include <linux/list.h>
 #include <linux/dma-mapping.h>
 
+struct device;
 struct dma_buf;
 struct dma_buf_attachment;
 
index 1cd3947987e571489b2e0a6a2b5df88480d72e50..ba317e2930a19c78741f93379d6d3d259821b99a 100644 (file)
 #define _LINUX_EDAC_H_
 
 #include <linux/atomic.h>
-#include <linux/device.h>
+#include <linux/kobject.h>
+#include <linux/completion.h>
+#include <linux/workqueue.h>
+
+struct device;
 
 #define EDAC_OPSTATE_INVAL     -1
 #define EDAC_OPSTATE_POLL      0
index c18122f40543406a46ceb8ac3802a92ec4d2869b..9d509675034a673293faa32c201c0ec53f6b459c 100644 (file)
@@ -407,7 +407,6 @@ struct fb_cursor {
 
 #include <linux/fs.h>
 #include <linux/init.h>
-#include <linux/device.h>
 #include <linux/workqueue.h>
 #include <linux/notifier.h>
 #include <linux/list.h>
index 84ccf8e04fa641525db86b85b2178a13bc6e7b4f..fba45b89689ecb4360bf862dfa748e6d587ca39c 100644 (file)
@@ -2,7 +2,6 @@
 #define _LINUX_FIREWIRE_H
 
 #include <linux/completion.h>
-#include <linux/device.h>
 #include <linux/dma-mapping.h>
 #include <linux/kernel.h>
 #include <linux/kref.h>
@@ -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;
index a90c09d331c1c09fa94048e401b55cfa9970a928..1c7b89ae6bdcb3977899c21b152271189980118a 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef _LINUX_HWMON_SYSFS_H
 #define _LINUX_HWMON_SYSFS_H
 
+#include <linux/device.h>
+
 struct sensor_device_attribute{
        struct device_attribute dev_attr;
        int index;
index 6b6ee702b007406d44352f1104a43f4fb4d91cd7..82b29ae6ebb0d38235a364f447263a4183c66534 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef _HWMON_H_
 #define _HWMON_H_
 
-#include <linux/device.h>
+struct device;
 
 struct device *hwmon_device_register(struct device *dev);
 
index aad6bd4b3efdf97046edabd3fe75fbb3ed052465..3343298e40e83453e84dad4d8704af95ef57b5f7 100644 (file)
 
 #include <linux/err.h>
 #include <linux/sched.h>
-#include <linux/device.h>
 
 /* 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;
index 501370b61ee5017c43b1157a834dac19dddae098..7afe15f916da3cf5b0ca59e83eb8900447a60705 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/interrupt.h>
 #include <linux/bitops.h>
 #include <linux/bio.h>
-#include <linux/device.h>
 #include <linux/pci.h>
 #include <linux/completion.h>
 #include <linux/pm.h>
@@ -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,
index bbd156bb953b8773b1f727898d9889612ac91bc1..48dcba9b2065d178d0dd0fa7d1d9d02f4bd191be 100644 (file)
@@ -220,10 +220,10 @@ struct kernel_ipmi_msg {
  * The in-kernel interface.
  */
 #include <linux/list.h>
-#include <linux/device.h>
 #include <linux/proc_fs.h>
 
 struct module;
+struct device;
 
 /* Opaque type for a IPMI message user.  One of these is needed to
    send and receive messages. */
index 3ef0d8b6aa6faf19c8e8d24a3033f15fc728a39b..fcb5d44ea6358b8165a2a1b80ddca56fb3d80595 100644 (file)
 
 #include <linux/ipmi_msgdefs.h>
 #include <linux/proc_fs.h>
-#include <linux/device.h>
 #include <linux/platform_device.h>
 #include <linux/ipmi.h>
 
+struct device;
+
 /* This files describes the interface for IPMI system management interface
    drivers to bind into the IPMI message handler. */
 
index 9053f95e968716f9e11625cd1ac28a96a060bbdd..8184578fbfa45621a83380c11066f009b4949a5b 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef __LINUX_JZ4740_ADC
 #define __LINUX_JZ4740_ADC
 
-#include <linux/device.h>
+struct device;
 
 /*
  * jz4740_adc_set_config - Configure a JZ4740 adc device
index d9a51b9b3300a784f12536ec1670338248cf9b8a..c37288b23e0cf4cb1bb37fa4a0516efcd0cd4d5f 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef __LINUX_MAPLE_H
 #define __LINUX_MAPLE_H
 
-#include <linux/device.h>
 #include <mach/maple.h>
 
+struct device;
 extern struct bus_type maple_bus_type;
 
 /* Maple Bus command and response codes */
index 9970337ff0412ca255b89a72564f3ebb96da966e..e20dd6ead1d09f2dee7d35af32397f40ad92d8f4 100644 (file)
  * Author: Rickard Andersson <rickard.andersson@stericsson.com>
  */
 
-#include <linux/device.h>
 #include <linux/regulator/machine.h>
 
+struct device;
+
 #ifndef MFD_ABX500_H
 #define MFD_ABX500_H
 
index a720051ae933e737e24c7f6549b75243e11ff130..54f820ed73bbf56efdf2b87855056a0c0f23b62a 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef MFD_AB5500_H
 #define MFD_AB5500_H
 
-#include <linux/device.h>
+struct device;
 
 enum ab5500_devid {
        AB5500_DEVID_ADC,
index 838c6b487cc533193f60b7372f85a5080c89c7a5..dca94396190d19a243dfc4d1ddc60b9f9b6fc896 100644 (file)
@@ -7,7 +7,9 @@
 #ifndef MFD_AB8500_H
 #define MFD_AB8500_H
 
-#include <linux/device.h>
+#include <linux/mutex.h>
+
+struct device;
 
 /*
  * AB8500 bank addresses
index d5517fd32d1b0899fdc7b350c5229d9477bae352..00fa3de7659dd3e1ea09472cb396bcb3d1ae2c45 100644 (file)
@@ -18,7 +18,6 @@
 #ifndef __MFD_PM8921_H
 #define __MFD_PM8921_H
 
-#include <linux/device.h>
 #include <linux/mfd/pm8xxx/irq.h>
 
 #define PM8921_NR_IRQS         256
index ca1d7a3476004d6936c104a8a435dfd4ac4e5f52..8c54de674b4b7577e2da771880054765703b2831 100644 (file)
@@ -8,7 +8,9 @@
 #ifndef __LINUX_MFD_STMPE_H
 #define __LINUX_MFD_STMPE_H
 
-#include <linux/device.h>
+#include <linux/mutex.h>
+
+struct device;
 
 enum stmpe_block {
        STMPE_BLOCK_GPIO        = 1 << 0,
index 16c76e124f9cc4b983d539b3fbf510f1378ccbff..3acb3a8e3af589cbf9b237290bb18d0216d57a8d 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef __LINUX_MFD_TC3589x_H
 #define __LINUX_MFD_TC3589x_H
 
-#include <linux/device.h>
+struct device;
 
 enum tx3589x_block {
        TC3589x_BLOCK_GPIO        = 1 << 0,
index e1eebf78caba1232eabc2a515e33a17513cfd12d..5f1298b1b5efc66ffbe39aff52314d03f3aed24f 100644 (file)
@@ -33,7 +33,6 @@
 #ifndef MLX4_DRIVER_H
 #define MLX4_DRIVER_H
 
-#include <linux/device.h>
 #include <linux/mlx4/device.h>
 
 struct mlx4_dev;
index 9f22ba572de0a9a332ec4c2156560b0eac8726cc..895978c9a16b6c5968ae8bd17c4f89355498bf79 100644 (file)
@@ -10,6 +10,7 @@
 #ifndef LINUX_MMC_CARD_H
 #define LINUX_MMC_CARD_H
 
+#include <linux/device.h>
 #include <linux/mmc/core.h>
 #include <linux/mod_devicetable.h>
 
index 87a976cc5654d164361014849a8733c6733c18e9..2e6a681fceb26adeadcd6979bdeed6fabfd4d7af 100644 (file)
@@ -9,7 +9,7 @@
 #define LINUX_MMC_CORE_H
 
 #include <linux/interrupt.h>
-#include <linux/device.h>
+#include <linux/completion.h>
 
 struct request;
 struct mmc_data;
index 0beba1e5e1ed4675ebbe35b42091394845be459e..68558d743da5f197a72fd59b59cee8651760ed02 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <linux/leds.h>
 #include <linux/sched.h>
+#include <linux/device.h>
 #include <linux/fault-inject.h>
 
 #include <linux/mmc/core.h>
index 0eac07c95255a7cb00f2e39667f3945e1b718f3f..fa568da2fcda39a7c081a0bb761b213400f1599d 100644 (file)
@@ -38,7 +38,6 @@
 #include <asm/cache.h>
 #include <asm/byteorder.h>
 
-#include <linux/device.h>
 #include <linux/percpu.h>
 #include <linux/rculist.h>
 #include <linux/dmaengine.h>
@@ -56,6 +55,7 @@
 #include <linux/netdev_features.h>
 
 struct netpoll_info;
+struct device;
 struct phy_device;
 /* 802.11 specific */
 struct wireless_dev;
index ae5638480ef22141f0699854d4b59fbba57aeffe..b444adf692ddd7d4c964553f082e36bb5101549a 100644 (file)
@@ -5,10 +5,11 @@
 #include <linux/of_platform.h> /* temporary until merge */
 
 #ifdef CONFIG_OF_DEVICE
-#include <linux/device.h>
 #include <linux/of.h>
 #include <linux/mod_devicetable.h>
 
+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);
index ee94b33080c207332e43291caaf240a62541a919..2a4e5faee904fcfd85fd54eba39901978bdeecf1 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/notifier.h>
 
 struct opp;
+struct device;
 
 enum opp_event {
        OPP_EVENT_ADD, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE,
index c599f7eca1e7a4bb2f66ab1e644225c40cab8293..6fe0a37d4abf3ca87b9e572bf21d21e21f07b34c 100644 (file)
@@ -19,7 +19,6 @@
 #define __PHY_H
 
 #include <linux/spinlock.h>
-#include <linux/device.h>
 #include <linux/ethtool.h>
 #include <linux/mii.h>
 #include <linux/timer.h>
@@ -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
  *
index a03a0ad998b81498b26697927931606d0349e13d..fa2e20b621b018f9a1d51e032213d5f2ba375e27 100644 (file)
@@ -10,6 +10,8 @@
 #define _LINUX_PM_DOMAIN_H
 
 #include <linux/device.h>
+#include <linux/mutex.h>
+#include <linux/pm.h>
 #include <linux/err.h>
 
 enum gpd_status {
index fa9b962aec124ad0e126d7400d8a92325525d9ff..c38c13db8832e7b3c15440807e7e7719a5603792 100644 (file)
 #ifndef __LINUX_POWER_SUPPLY_H__
 #define __LINUX_POWER_SUPPLY_H__
 
-#include <linux/device.h>
 #include <linux/workqueue.h>
 #include <linux/leds.h>
 
+struct device;
+
 /*
  * All voltages, currents, charges, energies, time and temperatures in uV,
  * µA, µAh, µWh, seconds and tenths of degree Celsius unless otherwise
index eb93921cdd30252b1c960cf6872585e308c9e9fc..765736cbb5093380ab6be278732bcd9028f764dd 100644 (file)
  * published by the Free Software Foundation.
  */
 
-#include <linux/device.h>
 #include <linux/list.h>
 
 struct module;
+struct device;
 struct i2c_client;
 struct spi_device;
 
index f2698a0edfc44486a95bd8379b1fa40dd56e1e70..10e0d33e8ff741cc790446ad64c589d281d54058 100644 (file)
@@ -35,7 +35,8 @@
 #ifndef __LINUX_REGULATOR_CONSUMER_H_
 #define __LINUX_REGULATOR_CONSUMER_H_
 
-#include <linux/device.h>
+struct device;
+struct notifier_block;
 
 /*
  * Regulator operating modes.
index c6c608482cba493bbe8bf2c2dd5779420f4552db..6fdf02737e9decd563ac8616fb510d4951c11515 100644 (file)
@@ -117,10 +117,10 @@ enum rfkill_user_states {
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/mutex.h>
-#include <linux/device.h>
 #include <linux/leds.h>
 #include <linux/err.h>
 
+struct device;
 /* this is opaque */
 struct rfkill;
 
index 229b3ca23134634999a93d32bf6eb4a9c01d5448..7f07470e1ed9443e20cbc1cafe0d696e04bdb8c6 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/ioport.h>
 #include <linux/list.h>
 #include <linux/errno.h>
-#include <linux/device.h>
 #include <linux/string.h>
 #include <linux/rio.h>
 
index de6c19c7f340cce8e34d7ac6c6316cff63980d93..79ad87b0be3e979fb62e3222357fe3714f18eb72 100644 (file)
@@ -20,7 +20,6 @@
 #define _LINUX_SERIAL_PNX8XXX_H
 
 #include <linux/serial_core.h>
-#include <linux/device.h>
 
 #define PNX8XXX_NR_PORTS       2
 
index 0f4eb165f2542fbafcfe6433c0fa0ef8f8396260..32be8dbdf1917b900b4a97ac19d02447915a098c 100644 (file)
@@ -1,10 +1,10 @@
 #ifndef __LINUX_SPI_MMC_SPI_H
 #define __LINUX_SPI_MMC_SPI_H
 
-#include <linux/device.h>
 #include <linux/spi/spi.h>
 #include <linux/interrupt.h>
 
+struct device;
 struct mmc_host;
 
 /* Put this in platform_data of a device being used to manage an MMC/SD
index 57031b4d12f2a51f352524ba765f43d41f261415..aaf24ba12c4df38bc46f4c3ee56fa5a5767555a9 100644 (file)
 #define __debug__h__
 
 #include <linux/types.h>
-#include <linux/device.h>
 #include <linux/slab.h>
 
+struct device;
 
 /* Backend stuff */
 
index 6a27d916c2504ac3705b865e897a1eee9276ca33..eaade9815bb63fa885ce25b55b5856ee017a1550 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef _MEDIA_DEVICE_H
 #define _MEDIA_DEVICE_H
 
-#include <linux/device.h>
 #include <linux/list.h>
 #include <linux/mutex.h>
 #include <linux/spinlock.h>
@@ -31,6 +30,8 @@
 #include <media/media-devnode.h>
 #include <media/media-entity.h>
 
+struct device;
+
 /**
  * struct media_device - Media device
  * @dev:       Parent device
index eeb3df637144cd12ed16209ca07836c70364f36c..62e04dda22f22e3ef43132685bcd274f7615732b 100644 (file)
@@ -22,7 +22,6 @@
 #define _V4L2_CTRLS_H
 
 #include <linux/list.h>
-#include <linux/device.h>
 #include <linux/videodev2.h>
 
 /* forward references */
index 3f5d60fc5df689845cfb731d61bee2b3f0e48673..032ff21b28bb3ea232a7fa7c87ebb2808b003f7c 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <linux/poll.h>
 #include <linux/fs.h>
-#include <linux/device.h>
 #include <linux/mutex.h>
 #include <linux/compiler.h> /* need __user */
 #include <linux/videodev2.h>
index d49928ba5d09fa379fd5db91ea173cfe08d57475..f0605df39e95b6f5c12862ebbefa53ce8b61842c 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/kernel.h>
 #include <linux/if_ether.h>
 #include <linux/skbuff.h>
-#include <linux/device.h>
 #include <linux/ieee80211.h>
 #include <net/cfg80211.h>
 #include <asm/unaligned.h>
@@ -87,6 +86,8 @@
  *
  */
 
+struct device;
+
 /**
  * enum ieee80211_max_queues - maximum number of queues
  *
index 77273f2fdd8020939e35a4e4f3d567d013eadc63..34dc8315d837d213f01644e5e7d7af0331f6902e 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef _SCSI_SCSI_DEVICE_H
 #define _SCSI_SCSI_DEVICE_H
 
-#include <linux/device.h>
 #include <linux/list.h>
 #include <linux/spinlock.h>
 #include <linux/workqueue.h>
@@ -9,6 +8,7 @@
 #include <scsi/scsi.h>
 #include <linux/atomic.h>
 
+struct device;
 struct request_queue;
 struct scsi_cmnd;
 struct scsi_lun;
index 5ab255f196cc85c6b894adc2182f1271562a301e..a4207163697e3835bb8b0885d36b8f12c9ca1a6f 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/mutex.h>               /* struct mutex */
 #include <linux/rwsem.h>               /* struct rw_semaphore */
 #include <linux/pm.h>                  /* pm_message_t */
-#include <linux/device.h>
 #include <linux/stringify.h>
 
 /* number of supported soundcards */
 #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 */
 
index d26a9b784772d797e88a529f199342f277e32390..ab0d84aeae1e0eb9f0dc9c8dc6aa0b11ff4f14e0 100644 (file)
 #ifndef __LINUX_SND_SOC_DAPM_H
 #define __LINUX_SND_SOC_DAPM_H
 
-#include <linux/device.h>
 #include <linux/types.h>
 #include <sound/control.h>
 
+struct device;
+
 /* widget has no PM register bit */
 #define SND_SOC_NOPM   -1
 
index 12fbf43524e90e77759e80751bfe5ab983b4ad2d..50fe9ba6144247383ec00d853eb94c732ea8631d 100644 (file)
@@ -4,10 +4,10 @@
 #if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_REGMAP_H
 
-#include <linux/device.h>
 #include <linux/ktime.h>
 #include <linux/tracepoint.h>
 
+struct device;
 struct regmap;
 
 /*
index d62c558bf64be73a957cfafa171cd53b9530b5a8..33f85b68c22c13b0a4492d2b81e180edd837886a 100644 (file)
@@ -7,7 +7,8 @@
 
 #include <linux/ktime.h>
 #include <linux/tracepoint.h>
-#include <linux/device.h>
+
+struct device;
 
 /*
  * The rpm_internal events are used for tracing some important
index 8588a891802339a2939dfc91e5630e3a826781d4..2d0dd3e03e41a641d0d17e289059005e0f6f95bb 100644 (file)
@@ -5,7 +5,6 @@
 #define _TRACE_WRITEBACK_H
 
 #include <linux/backing-dev.h>
-#include <linux/device.h>
 #include <linux/writeback.h>
 
 #define show_inode_state(state)                                        \