aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h10
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;
49union i2c_smbus_data; 48union i2c_smbus_data;
50struct i2c_board_info; 49struct i2c_board_info;
51 50
51struct 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 *);
451extern int i2c_register_driver(struct module *, struct i2c_driver *); 452extern int i2c_register_driver(struct module *, struct i2c_driver *);
452extern void i2c_del_driver(struct i2c_driver *); 453extern void i2c_del_driver(struct i2c_driver *);
453 454
454static 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
459extern struct i2c_client *i2c_use_client(struct i2c_client *client); 459extern struct i2c_client *i2c_use_client(struct i2c_client *client);
460extern void i2c_release_client(struct i2c_client *client); 460extern void i2c_release_client(struct i2c_client *client);