]> err.no Git - linux-2.6/blobdiff - include/linux/i2c.h
[PATCH] nfsd: check error status from nfsd_sync_dir
[linux-2.6] / include / linux / i2c.h
index a9cea62fd486af8cac138bdb9b455af75255e98d..7863a59bd5986983fdeb4c92dca2782427bf184e 100644 (file)
@@ -105,11 +105,12 @@ extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
  * A driver is capable of handling one or more physical devices present on
  * I2C adapters. This information is used to inform the driver of adapter
  * events.
+ *
+ * The driver.owner field should be set to the module owner of this driver.
+ * The driver.name field should be set to the name of this driver.
  */
 
 struct i2c_driver {
-       struct module *owner;
-       char name[32];
        int id;
        unsigned int class;
 
@@ -290,9 +291,14 @@ struct i2c_client_address_data {
 extern int i2c_add_adapter(struct i2c_adapter *);
 extern int i2c_del_adapter(struct i2c_adapter *);
 
-extern int i2c_add_driver(struct i2c_driver *);
+extern int i2c_register_driver(struct module *, struct i2c_driver *);
 extern int i2c_del_driver(struct i2c_driver *);
 
+static inline int i2c_add_driver(struct i2c_driver *driver)
+{
+       return i2c_register_driver(THIS_MODULE, driver);
+}
+
 extern int i2c_attach_client(struct i2c_client *);
 extern int i2c_detach_client(struct i2c_client *);