summaryrefslogtreecommitdiff
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index a8f482b94ba4..0ae665586de1 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -143,7 +143,10 @@ struct i2c_driver {
* with the device.
*/
int (*command)(struct i2c_client *client,unsigned int cmd, void *arg);
+
+ struct device_driver driver;
};
+#define to_i2c_driver(d) container_of(d, struct i2c_driver, driver)
extern struct bus_type i2c_bus_type;