diff options
| author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-01-30 11:46:54 -0500 |
|---|---|---|
| committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-03-16 10:38:24 -0400 |
| commit | 313162d0b83836e2f57e51b9b8650fb4b9c396ea (patch) | |
| tree | 8f39f20515a924d392cf9a72db0918fda07a34c7 /include | |
| parent | 51990e825431089747f8896244b5c17d3a6423f1 (diff) | |
device.h: audit and cleanup users in main include dir
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>
Diffstat (limited to 'include')
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 @@ | |||
| 25 | #ifndef _SSP_PL022_H | 25 | #ifndef _SSP_PL022_H |
| 26 | #define _SSP_PL022_H | 26 | #define _SSP_PL022_H |
| 27 | 27 | ||
| 28 | #include <linux/device.h> | ||
| 29 | |||
| 30 | /** | 28 | /** |
| 31 | * whether SSP is in loopback mode or not | 29 | * whether SSP is in loopback mode or not |
| 32 | */ | 30 | */ |
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 { | |||
| 213 | 213 | ||
| 214 | #ifdef __KERNEL__ | 214 | #ifdef __KERNEL__ |
| 215 | 215 | ||
| 216 | #include <linux/device.h> | ||
| 217 | #include <linux/wait.h> /* wait_queue_head_t */ | 216 | #include <linux/wait.h> /* wait_queue_head_t */ |
| 218 | #include <linux/time.h> /* struct timeval */ | 217 | #include <linux/time.h> /* struct timeval */ |
| 219 | #include <linux/net.h> | 218 | #include <linux/net.h> |
| @@ -249,6 +248,7 @@ struct k_atm_dev_stats { | |||
| 249 | struct k_atm_aal_stats aal5; | 248 | struct k_atm_aal_stats aal5; |
| 250 | }; | 249 | }; |
| 251 | 250 | ||
| 251 | struct device; | ||
| 252 | 252 | ||
| 253 | enum { | 253 | enum { |
| 254 | ATM_VF_ADDR, /* Address is in use. Set by anybody, cleared | 254 | 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 @@ | |||
| 9 | #ifndef _ATTRIBUTE_CONTAINER_H_ | 9 | #ifndef _ATTRIBUTE_CONTAINER_H_ |
| 10 | #define _ATTRIBUTE_CONTAINER_H_ | 10 | #define _ATTRIBUTE_CONTAINER_H_ |
| 11 | 11 | ||
| 12 | #include <linux/device.h> | ||
| 13 | #include <linux/list.h> | 12 | #include <linux/list.h> |
| 14 | #include <linux/klist.h> | 13 | #include <linux/klist.h> |
| 15 | 14 | ||
| 15 | struct device; | ||
| 16 | |||
| 16 | struct attribute_container { | 17 | struct attribute_container { |
| 17 | struct list_head node; | 18 | struct list_head node; |
| 18 | struct klist containers; | 19 | 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 @@ | |||
| 9 | * the Free Software Foundation | 9 | * the Free Software Foundation |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/device.h> | ||
| 13 | #include <linux/kmemcheck.h> | 12 | #include <linux/kmemcheck.h> |
| 14 | 13 | ||
| 15 | #define C2PORT_NAME_LEN 32 | 14 | #define C2PORT_NAME_LEN 32 |
| 16 | 15 | ||
| 16 | struct device; | ||
| 17 | |||
| 17 | /* | 18 | /* |
| 18 | * C2 port basic structs | 19 | * C2 port basic structs |
| 19 | */ | 20 | */ |
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 { | |||
| 910 | 910 | ||
| 911 | #ifdef __KERNEL__ | 911 | #ifdef __KERNEL__ |
| 912 | #include <linux/fs.h> /* not really needed, later.. */ | 912 | #include <linux/fs.h> /* not really needed, later.. */ |
| 913 | #include <linux/device.h> | ||
| 914 | #include <linux/list.h> | 913 | #include <linux/list.h> |
| 915 | 914 | ||
| 916 | struct packet_command | 915 | 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 @@ | |||
| 14 | #ifndef _LINUX_CPU_H_ | 14 | #ifndef _LINUX_CPU_H_ |
| 15 | #define _LINUX_CPU_H_ | 15 | #define _LINUX_CPU_H_ |
| 16 | 16 | ||
| 17 | #include <linux/device.h> | ||
| 18 | #include <linux/node.h> | 17 | #include <linux/node.h> |
| 19 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
| 20 | #include <linux/cpumask.h> | 19 | #include <linux/cpumask.h> |
| 21 | 20 | ||
| 21 | struct device; | ||
| 22 | |||
| 22 | struct cpu { | 23 | struct cpu { |
| 23 | int node_id; /* The node which contains the CPU */ | 24 | int node_id; /* The node which contains the CPU */ |
| 24 | int hotpluggable; /* creates sysfs control file if hotpluggable */ | 25 | 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 @@ | |||
| 14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
| 15 | #include <linux/notifier.h> | ||
