diff options
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r-- | include/linux/i2c.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 38a21c3edd2c..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 |
@@ -451,10 +452,9 @@ extern int i2c_add_numbered_adapter(struct i2c_adapter *); | |||
451 | extern int i2c_register_driver(struct module *, struct i2c_driver *); | 452 | extern int i2c_register_driver(struct module *, struct i2c_driver *); |
452 | extern void i2c_del_driver(struct i2c_driver *); | 453 | extern void i2c_del_driver(struct i2c_driver *); |
453 | 454 | ||
454 | static inline int i2c_add_driver(struct i2c_driver *driver) | 455 | /* use a define to avoid include chaining to get THIS_MODULE */ |
455 | { | 456 | #define i2c_add_driver(driver) \ |
456 | return i2c_register_driver(THIS_MODULE, driver); | 457 | i2c_register_driver(THIS_MODULE, driver) |
457 | } | ||
458 | 458 | ||
459 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); | 459 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); |
460 | extern void i2c_release_client(struct i2c_client *client); | 460 | extern void i2c_release_client(struct i2c_client *client); |