diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-05-26 13:46:22 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-10-31 19:32:32 -0400 |
commit | de47725421ad5627a5c905f4e40bb844ebc06d29 (patch) | |
tree | bc23b0405d4a79dcc866a8b2877f128ee0ea9ffc /include/linux/i2c.h | |
parent | eb5589a8f0dab7e29021344228856339e6a1249c (diff) |
include: replace linux/module.h with "struct module" wherever possible
The <linux/module.h> pretty much brings in the kitchen sink along
with it, so it should be avoided wherever reasonably possible in
terms of being included from other commonly used <linux/something.h>
files, as it results in a measureable increase on compile times.
The worst culprit was probably device.h since it is used everywhere.
This file also had an implicit dependency/usage of mutex.h which was
masked by module.h, and is also fixed here at the same time.
There are over a dozen other headers that simply declare the
struct instead of pulling in the whole file, so follow their lead
and simply make it a few more.
Most of the implicit dependencies on module.h being present by
these headers pulling it in have been now weeded out, so we can
finally make this change with hopefully minimal breakage.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r-- | include/linux/i2c.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 1be303bfc254..a81bf6d23b3e 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
31 | #include <linux/module.h> | ||
32 | #include <linux/mod_devicetable.h> | 31 | #include <linux/mod_devicetable.h> |
33 | #include <linux/device.h> /* for struct device */ | 32 | #include <linux/device.h> /* for struct device */ |
34 | #include <linux/sched.h> /* for completion */ | 33 | #include <linux/sched.h> /* for completion */ |
@@ -49,6 +48,8 @@ struct i2c_driver; | |||
49 | union i2c_smbus_data; | 48 | union i2c_smbus_data; |
50 | struct i2c_board_info; | 49 | struct i2c_board_info; |
51 | 50 | ||
51 | struct module; | ||
52 | |||
52 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 53 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
53 | /* | 54 | /* |
54 | * The master routines are the ones normally used to transmit data to devices | 55 | * The master routines are the ones normally used to transmit data to devices |