Commit cdaf7934 authored by Laurent Riffard's avatar Laurent Riffard Committed by Greg Kroah-Hartman

[PATCH] i2c: Drop i2c_driver.{owner,name}, 3 of 11

We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.

This patch updates the hwmon drivers.
Signed-off-by: default avatarLaurent Riffard <laurent.riffard@free.fr>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a9718b0c
...@@ -126,8 +126,10 @@ static int read_only; ...@@ -126,8 +126,10 @@ static int read_only;
/* This is the driver that will be inserted */ /* This is the driver that will be inserted */
static struct i2c_driver adm1021_driver = { static struct i2c_driver adm1021_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "adm1021", .name = "adm1021",
},
.id = I2C_DRIVERID_ADM1021, .id = I2C_DRIVERID_ADM1021,
.attach_adapter = adm1021_attach_adapter, .attach_adapter = adm1021_attach_adapter,
.detach_client = adm1021_detach_client, .detach_client = adm1021_detach_client,
......
...@@ -118,8 +118,10 @@ static struct adm1025_data *adm1025_update_device(struct device *dev); ...@@ -118,8 +118,10 @@ static struct adm1025_data *adm1025_update_device(struct device *dev);
*/ */
static struct i2c_driver adm1025_driver = { static struct i2c_driver adm1025_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "adm1025", .name = "adm1025",
},
.id = I2C_DRIVERID_ADM1025, .id = I2C_DRIVERID_ADM1025,
.attach_adapter = adm1025_attach_adapter, .attach_adapter = adm1025_attach_adapter,
.detach_client = adm1025_detach_client, .detach_client = adm1025_detach_client,
......
...@@ -308,8 +308,10 @@ static void adm1026_init_client(struct i2c_client *client); ...@@ -308,8 +308,10 @@ static void adm1026_init_client(struct i2c_client *client);
static struct i2c_driver adm1026_driver = { static struct i2c_driver adm1026_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "adm1026", .name = "adm1026",
},
.attach_adapter = adm1026_attach_adapter, .attach_adapter = adm1026_attach_adapter,
.detach_client = adm1026_detach_client, .detach_client = adm1026_detach_client,
}; };
......
...@@ -105,8 +105,10 @@ static struct adm1031_data *adm1031_update_device(struct device *dev); ...@@ -105,8 +105,10 @@ static struct adm1031_data *adm1031_update_device(struct device *dev);
/* This is the driver that will be inserted */ /* This is the driver that will be inserted */
static struct i2c_driver adm1031_driver = { static struct i2c_driver adm1031_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "adm1031", .name = "adm1031",
},
.attach_adapter = adm1031_attach_adapter, .attach_adapter = adm1031_attach_adapter,
.detach_client = adm1031_detach_client, .detach_client = adm1031_detach_client,
}; };
......
...@@ -137,8 +137,10 @@ static struct adm9240_data *adm9240_update_device(struct device *dev); ...@@ -137,8 +137,10 @@ static struct adm9240_data *adm9240_update_device(struct device *dev);
/* driver data */ /* driver data */
static struct i2c_driver adm9240_driver = { static struct i2c_driver adm9240_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "adm9240", .name = "adm9240",
},
.id = I2C_DRIVERID_ADM9240, .id = I2C_DRIVERID_ADM9240,
.attach_adapter = adm9240_attach_adapter, .attach_adapter = adm9240_attach_adapter,
.detach_client = adm9240_detach_client, .detach_client = adm9240_detach_client,
......
...@@ -217,8 +217,10 @@ static struct asb100_data *asb100_update_device(struct device *dev); ...@@ -217,8 +217,10 @@ static struct asb100_data *asb100_update_device(struct device *dev);
static void asb100_init_client(struct i2c_client *client); static void asb100_init_client(struct i2c_client *client);
static struct i2c_driver asb100_driver = { static struct i2c_driver asb100_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "asb100", .name = "asb100",
},
.id = I2C_DRIVERID_ASB100, .id = I2C_DRIVERID_ASB100,
.attach_adapter = asb100_attach_adapter, .attach_adapter = asb100_attach_adapter,
.detach_client = asb100_detach_client, .detach_client = asb100_detach_client,
......
...@@ -50,8 +50,10 @@ static struct atxp1_data * atxp1_update_device(struct device *dev); ...@@ -50,8 +50,10 @@ static struct atxp1_data * atxp1_update_device(struct device *dev);
static int atxp1_detect(struct i2c_adapter *adapter, int address, int kind); static int atxp1_detect(struct i2c_adapter *adapter, int address, int kind);
static struct i2c_driver atxp1_driver = { static struct i2c_driver atxp1_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "atxp1", .name = "atxp1",
},
.attach_adapter = atxp1_attach_adapter, .attach_adapter = atxp1_attach_adapter,
.detach_client = atxp1_detach_client, .detach_client = atxp1_detach_client,
}; };
......
...@@ -89,8 +89,10 @@ static struct ds1621_data *ds1621_update_client(struct device *dev); ...@@ -89,8 +89,10 @@ static struct ds1621_data *ds1621_update_client(struct device *dev);
/* This is the driver that will be inserted */ /* This is the driver that will be inserted */
static struct i2c_driver ds1621_driver = { static struct i2c_driver ds1621_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "ds1621", .name = "ds1621",
},
.id = I2C_DRIVERID_DS1621, .id = I2C_DRIVERID_DS1621,
.attach_adapter = ds1621_attach_adapter, .attach_adapter = ds1621_attach_adapter,
.detach_client = ds1621_detach_client, .detach_client = ds1621_detach_client,
......
...@@ -118,8 +118,10 @@ static int fscher_write_value(struct i2c_client *client, u8 reg, u8 value); ...@@ -118,8 +118,10 @@ static int fscher_write_value(struct i2c_client *client, u8 reg, u8 value);
*/ */
static struct i2c_driver fscher_driver = { static struct i2c_driver fscher_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "fscher", .name = "fscher",
},
.id = I2C_DRIVERID_FSCHER, .id = I2C_DRIVERID_FSCHER,
.attach_adapter = fscher_attach_adapter, .attach_adapter = fscher_attach_adapter,
.detach_client = fscher_detach_client, .detach_client = fscher_detach_client,
......
...@@ -100,8 +100,10 @@ static void reset_fan_alarm(struct i2c_client *client, int nr); ...@@ -100,8 +100,10 @@ static void reset_fan_alarm(struct i2c_client *client, int nr);
* Driver data (common to all clients) * Driver data (common to all clients)
*/ */
static struct i2c_driver fscpos_driver = { static struct i2c_driver fscpos_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "fscpos", .name = "fscpos",
},
.id = I2C_DRIVERID_FSCPOS, .id = I2C_DRIVERID_FSCPOS,
.attach_adapter = fscpos_attach_adapter, .attach_adapter = fscpos_attach_adapter,
.detach_client = fscpos_detach_client, .detach_client = fscpos_detach_client,
......
...@@ -151,8 +151,10 @@ static struct gl518_data *gl518_update_device(struct device *dev); ...@@ -151,8 +151,10 @@ static struct gl518_data *gl518_update_device(struct device *dev);
/* This is the driver that will be inserted */ /* This is the driver that will be inserted */
static struct i2c_driver gl518_driver = { static struct i2c_driver gl518_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "gl518sm", .name = "gl518sm",
},
.id = I2C_DRIVERID_GL518, .id = I2C_DRIVERID_GL518,
.attach_adapter = gl518_attach_adapter, .attach_adapter = gl518_attach_adapter,
.detach_client = gl518_detach_client, .detach_client = gl518_detach_client,
......
...@@ -109,8 +109,10 @@ static struct gl520_data *gl520_update_device(struct device *dev); ...@@ -109,8 +109,10 @@ static struct gl520_data *gl520_update_device(struct device *dev);
/* Driver data */ /* Driver data */
static struct i2c_driver gl520_driver = { static struct i2c_driver gl520_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "gl520sm", .name = "gl520sm",
},
.id = I2C_DRIVERID_GL520, .id = I2C_DRIVERID_GL520,
.attach_adapter = gl520_attach_adapter, .attach_adapter = gl520_attach_adapter,
.detach_client = gl520_detach_client, .detach_client = gl520_detach_client,
......
...@@ -234,16 +234,20 @@ static void it87_init_client(struct i2c_client *client, struct it87_data *data); ...@@ -234,16 +234,20 @@ static void it87_init_client(struct i2c_client *client, struct it87_data *data);
static struct i2c_driver it87_driver = { static struct i2c_driver it87_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "it87", .name = "it87",
},
.id = I2C_DRIVERID_IT87, .id = I2C_DRIVERID_IT87,
.attach_adapter = it87_attach_adapter, .attach_adapter = it87_attach_adapter,
.detach_client = it87_detach_client, .detach_client = it87_detach_client,
}; };
static struct i2c_driver it87_isa_driver = { static struct i2c_driver it87_isa_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "it87-isa", .name = "it87-isa",
},
.attach_adapter = it87_isa_attach_adapter, .attach_adapter = it87_isa_attach_adapter,
.detach_client = it87_detach_client, .detach_client = it87_detach_client,
}; };
...@@ -760,7 +764,8 @@ static int it87_detect(struct i2c_adapter *adapter, int address, int kind) ...@@ -760,7 +764,8 @@ static int it87_detect(struct i2c_adapter *adapter, int address, int kind)
/* Reserve the ISA region */ /* Reserve the ISA region */
if (is_isa) if (is_isa)
if (!request_region(address, IT87_EXTENT, it87_isa_driver.name)) if (!request_region(address, IT87_EXTENT,
it87_isa_driver.driver.name))
goto ERROR0; goto ERROR0;
/* For now, we presume we have a valid client. We create the /* For now, we presume we have a valid client. We create the
......
...@@ -139,8 +139,10 @@ static void lm63_init_client(struct i2c_client *client); ...@@ -139,8 +139,10 @@ static void lm63_init_client(struct i2c_client *client);
*/ */
static struct i2c_driver lm63_driver = { static struct i2c_driver lm63_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm63", .name = "lm63",
},
.attach_adapter = lm63_attach_adapter, .attach_adapter = lm63_attach_adapter,
.detach_client = lm63_detach_client, .detach_client = lm63_detach_client,
}; };
......
...@@ -66,8 +66,10 @@ static struct lm75_data *lm75_update_device(struct device *dev); ...@@ -66,8 +66,10 @@ static struct lm75_data *lm75_update_device(struct device *dev);
/* This is the driver that will be inserted */ /* This is the driver that will be inserted */
static struct i2c_driver lm75_driver = { static struct i2c_driver lm75_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm75", .name = "lm75",
},
.id = I2C_DRIVERID_LM75, .id = I2C_DRIVERID_LM75,
.attach_adapter = lm75_attach_adapter, .attach_adapter = lm75_attach_adapter,
.detach_client = lm75_detach_client, .detach_client = lm75_detach_client,
......
...@@ -74,8 +74,10 @@ static struct lm77_data *lm77_update_device(struct device *dev); ...@@ -74,8 +74,10 @@ static struct lm77_data *lm77_update_device(struct device *dev);
/* This is the driver that will be inserted */ /* This is the driver that will be inserted */
static struct i2c_driver lm77_driver = { static struct i2c_driver lm77_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm77", .name = "lm77",
},
.attach_adapter = lm77_attach_adapter, .attach_adapter = lm77_attach_adapter,
.detach_client = lm77_detach_client, .detach_client = lm77_detach_client,
}; };
......
...@@ -164,16 +164,20 @@ static void lm78_init_client(struct i2c_client *client); ...@@ -164,16 +164,20 @@ static void lm78_init_client(struct i2c_client *client);
static struct i2c_driver lm78_driver = { static struct i2c_driver lm78_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm78", .name = "lm78",
},
.id = I2C_DRIVERID_LM78, .id = I2C_DRIVERID_LM78,
.attach_adapter = lm78_attach_adapter, .attach_adapter = lm78_attach_adapter,
.detach_client = lm78_detach_client, .detach_client = lm78_detach_client,
}; };
static struct i2c_driver lm78_isa_driver = { static struct i2c_driver lm78_isa_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm78-isa", .name = "lm78-isa",
},
.attach_adapter = lm78_isa_attach_adapter, .attach_adapter = lm78_isa_attach_adapter,
.detach_client = lm78_detach_client, .detach_client = lm78_detach_client,
}; };
...@@ -496,7 +500,7 @@ static int lm78_detect(struct i2c_adapter *adapter, int address, int kind) ...@@ -496,7 +500,7 @@ static int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
/* Reserve the ISA region */ /* Reserve the ISA region */
if (is_isa) if (is_isa)
if (!request_region(address, LM78_EXTENT, if (!request_region(address, LM78_EXTENT,
lm78_isa_driver.name)) { lm78_isa_driver.driver.name)) {
err = -EBUSY; err = -EBUSY;
goto ERROR0; goto ERROR0;
} }
......
...@@ -143,8 +143,10 @@ static int lm80_write_value(struct i2c_client *client, u8 reg, u8 value); ...@@ -143,8 +143,10 @@ static int lm80_write_value(struct i2c_client *client, u8 reg, u8 value);
*/ */
static struct i2c_driver lm80_driver = { static struct i2c_driver lm80_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm80", .name = "lm80",
},
.id = I2C_DRIVERID_LM80, .id = I2C_DRIVERID_LM80,
.attach_adapter = lm80_attach_adapter, .attach_adapter = lm80_attach_adapter,
.detach_client = lm80_detach_client, .detach_client = lm80_detach_client,
......
...@@ -124,8 +124,10 @@ static struct lm83_data *lm83_update_device(struct device *dev); ...@@ -124,8 +124,10 @@ static struct lm83_data *lm83_update_device(struct device *dev);
*/ */
static struct i2c_driver lm83_driver = { static struct i2c_driver lm83_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm83", .name = "lm83",
},
.id = I2C_DRIVERID_LM83, .id = I2C_DRIVERID_LM83,
.attach_adapter = lm83_attach_adapter, .attach_adapter = lm83_attach_adapter,
.detach_client = lm83_detach_client, .detach_client = lm83_detach_client,
......
...@@ -380,8 +380,10 @@ static void lm85_init_client(struct i2c_client *client); ...@@ -380,8 +380,10 @@ static void lm85_init_client(struct i2c_client *client);
static struct i2c_driver lm85_driver = { static struct i2c_driver lm85_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm85", .name = "lm85",
},
.id = I2C_DRIVERID_LM85, .id = I2C_DRIVERID_LM85,
.attach_adapter = lm85_attach_adapter, .attach_adapter = lm85_attach_adapter,
.detach_client = lm85_detach_client, .detach_client = lm85_detach_client,
......
...@@ -161,8 +161,10 @@ static struct lm87_data *lm87_update_device(struct device *dev); ...@@ -161,8 +161,10 @@ static struct lm87_data *lm87_update_device(struct device *dev);
*/ */
static struct i2c_driver lm87_driver = { static struct i2c_driver lm87_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm87", .name = "lm87",
},
.id = I2C_DRIVERID_LM87, .id = I2C_DRIVERID_LM87,
.attach_adapter = lm87_attach_adapter, .attach_adapter = lm87_attach_adapter,
.detach_client = lm87_detach_client, .detach_client = lm87_detach_client,
......
...@@ -186,8 +186,10 @@ static struct lm90_data *lm90_update_device(struct device *dev); ...@@ -186,8 +186,10 @@ static struct lm90_data *lm90_update_device(struct device *dev);
*/ */
static struct i2c_driver lm90_driver = { static struct i2c_driver lm90_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm90", .name = "lm90",
},
.id = I2C_DRIVERID_LM90, .id = I2C_DRIVERID_LM90,
.attach_adapter = lm90_attach_adapter, .attach_adapter = lm90_attach_adapter,
.detach_client = lm90_detach_client, .detach_client = lm90_detach_client,
......
...@@ -410,8 +410,10 @@ static int lm92_detach_client(struct i2c_client *client) ...@@ -410,8 +410,10 @@ static int lm92_detach_client(struct i2c_client *client)
*/ */
static struct i2c_driver lm92_driver = { static struct i2c_driver lm92_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "lm92", .name = "lm92",
},
.id = I2C_DRIVERID_LM92, .id = I2C_DRIVERID_LM92,
.attach_adapter = lm92_attach_adapter, .attach_adapter = lm92_attach_adapter,
.detach_client = lm92_detach_client, .detach_client = lm92_detach_client,
......
...@@ -90,8 +90,10 @@ static struct max1619_data *max1619_update_device(struct device *dev); ...@@ -90,8 +90,10 @@ static struct max1619_data *max1619_update_device(struct device *dev);
*/ */
static struct i2c_driver max1619_driver = { static struct i2c_driver max1619_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "max1619", .name = "max1619",
},
.attach_adapter = max1619_attach_adapter, .attach_adapter = max1619_attach_adapter,
.detach_client = max1619_detach_client, .detach_client = max1619_detach_client,
}; };
......
...@@ -236,8 +236,10 @@ static struct pc87360_data *pc87360_update_device(struct device *dev); ...@@ -236,8 +236,10 @@ static struct pc87360_data *pc87360_update_device(struct device *dev);
*/ */
static struct i2c_driver pc87360_driver = { static struct i2c_driver pc87360_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "pc87360", .name = "pc87360",
},
.attach_adapter = pc87360_detect, .attach_adapter = pc87360_detect,
.detach_client = pc87360_detach_client, .detach_client = pc87360_detach_client,
}; };
...@@ -798,7 +800,7 @@ static int pc87360_detect(struct i2c_adapter *adapter) ...@@ -798,7 +800,7 @@ static int pc87360_detect(struct i2c_adapter *adapter)
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
if (((data->address[i] = extra_isa[i])) if (((data->address[i] = extra_isa[i]))
&& !request_region(extra_isa[i], PC87360_EXTENT, && !request_region(extra_isa[i], PC87360_EXTENT,
pc87360_driver.name)) { pc87360_driver.driver.name)) {
dev_err(&new_client->dev, "Region 0x%x-0x%x already " dev_err(&new_client->dev, "Region 0x%x-0x%x already "
"in use!\n", extra_isa[i], "in use!\n", extra_isa[i],
extra_isa[i]+PC87360_EXTENT-1); extra_isa[i]+PC87360_EXTENT-1);
......
...@@ -198,8 +198,10 @@ static struct sis5595_data *sis5595_update_device(struct device *dev); ...@@ -198,8 +198,10 @@ static struct sis5595_data *sis5595_update_device(struct device *dev);
static void sis5595_init_client(struct i2c_client *client); static void sis5595_init_client(struct i2c_client *client);
static struct i2c_driver sis5595_driver = { static struct i2c_driver sis5595_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "sis5595", .name = "sis5595",
},
.attach_adapter = sis5595_detect, .attach_adapter = sis5595_detect,
.detach_client = sis5595_detach_client, .detach_client = sis5595_detach_client,
}; };
...@@ -484,7 +486,8 @@ static int sis5595_detect(struct i2c_adapter *adapter) ...@@ -484,7 +486,8 @@ static int sis5595_detect(struct i2c_adapter *adapter)
if (force_addr) if (force_addr)
address = force_addr & ~(SIS5595_EXTENT - 1); address = force_addr & ~(SIS5595_EXTENT - 1);
/* Reserve the ISA region */ /* Reserve the ISA region */
if (!request_region(address, SIS5595_EXTENT, sis5595_driver.name)) { if (!request_region(address, SIS5595_EXTENT,
sis5595_driver.driver.name)) {
err = -EBUSY; err = -EBUSY;
goto exit; goto exit;
} }
......
...@@ -226,8 +226,10 @@ static int smsc47b397_detach_client(struct i2c_client *client) ...@@ -226,8 +226,10 @@ static int smsc47b397_detach_client(struct i2c_client *client)
static int smsc47b397_detect(struct i2c_adapter *adapter); static int smsc47b397_detect(struct i2c_adapter *adapter);
static struct i2c_driver smsc47b397_driver = { static struct i2c_driver smsc47b397_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "smsc47b397", .name = "smsc47b397",
},
.attach_adapter = smsc47b397_detect, .attach_adapter = smsc47b397_detect,
.detach_client = smsc47b397_detach_client, .detach_client = smsc47b397_detach_client,
}; };
...@@ -238,7 +240,8 @@ static int smsc47b397_detect(struct i2c_adapter *adapter) ...@@ -238,7 +240,8 @@ static int smsc47b397_detect(struct i2c_adapter *adapter)
struct smsc47b397_data *data; struct smsc47b397_data *data;
int err = 0; int err = 0;
if (!request_region(address, SMSC_EXTENT, smsc47b397_driver.name)) { if (!request_region(address, SMSC_EXTENT,
smsc47b397_driver.driver.name)) {
dev_err(&adapter->dev, "Region 0x%x already in use!\n", dev_err(&adapter->dev, "Region 0x%x already in use!\n",
address); address);
return -EBUSY; return -EBUSY;
......
...@@ -126,8 +126,10 @@ static struct smsc47m1_data *smsc47m1_update_device(struct device *dev, ...@@ -126,8 +126,10 @@ static struct smsc47m1_data *smsc47m1_update_device(struct device *dev,
static struct i2c_driver smsc47m1_driver = { static struct i2c_driver smsc47m1_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "smsc47m1", .name = "smsc47m1",
},
.attach_adapter = smsc47m1_detect, .attach_adapter = smsc47m1_detect,
.detach_client = smsc47m1_detach_client, .detach_client = smsc47m1_detach_client,
}; };
...@@ -394,7 +396,7 @@ static int smsc47m1_detect(struct i2c_adapter *adapter) ...@@ -394,7 +396,7 @@ static int smsc47m1_detect(struct i2c_adapter *adapter)
int err = 0; int err = 0;
int fan1, fan2, pwm1, pwm2; int fan1, fan2, pwm1, pwm2;
if (!request_region(address, SMSC_EXTENT, smsc47m1_driver.name)) { if (!request_region(address, SMSC_EXTENT, smsc47m1_driver.driver.name)) {
dev_err(&adapter->dev, "Region 0x%x already in use!\n", address); dev_err(&adapter->dev, "Region 0x%x already in use!\n", address);
return -EBUSY; return -EBUSY;
} }
......
...@@ -572,8 +572,10 @@ static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); ...@@ -572,8 +572,10 @@ static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);
/* The driver. I choose to use type i2c_driver, as at is identical to both /* The driver. I choose to use type i2c_driver, as at is identical to both
smbus_driver and isa_driver, and clients could be of either kind */ smbus_driver and isa_driver, and clients could be of either kind */
static struct i2c_driver via686a_driver = { static struct i2c_driver via686a_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "via686a", .name = "via686a",
},
.attach_adapter = via686a_detect, .attach_adapter = via686a_detect,
.detach_client = via686a_detach_client, .detach_client = via686a_detach_client,
}; };
...@@ -615,7 +617,8 @@ static int via686a_detect(struct i2c_adapter *adapter) ...@@ -615,7 +617,8 @@ static int via686a_detect(struct i2c_adapter *adapter)
} }
/* Reserve the ISA region */ /* Reserve the ISA region */
if (!request_region(address, VIA686A_EXTENT, via686a_driver.name)) { if (!request_region(address, VIA686A_EXTENT,
via686a_driver.driver.name)) {
dev_err(&adapter->dev, "region 0x%x already in use!\n", dev_err(&adapter->dev, "region 0x%x already in use!\n",
address); address);
return -ENODEV; return -ENODEV;
......
...@@ -585,8 +585,10 @@ static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, ...@@ -585,8 +585,10 @@ static ssize_t show_alarms(struct device *dev, struct device_attribute *attr,
static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);
static struct i2c_driver vt8231_driver = { static struct i2c_driver vt8231_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "vt8231", .name = "vt8231",
},
.attach_adapter = vt8231_detect, .attach_adapter = vt8231_detect,
.detach_client = vt8231_detach_client, .detach_client = vt8231_detach_client,
}; };
......
...@@ -676,7 +676,7 @@ static int w83627ehf_detect(struct i2c_adapter *adapter) ...@@ -676,7 +676,7 @@ static int w83627ehf_detect(struct i2c_adapter *adapter)
int i, err = 0; int i, err = 0;
if (!request_region(address + REGION_OFFSET, REGION_LENGTH, if (!request_region(address + REGION_OFFSET, REGION_LENGTH,
w83627ehf_driver.name)) { w83627ehf_driver.driver.name)) {
err = -EBUSY; err = -EBUSY;
goto exit; goto exit;
} }
...@@ -785,8 +785,10 @@ static int w83627ehf_detach_client(struct i2c_client *client) ...@@ -785,8 +785,10 @@ static int w83627ehf_detach_client(struct i2c_client *client)
} }
static struct i2c_driver w83627ehf_driver = { static struct i2c_driver w83627ehf_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "w83627ehf", .name = "w83627ehf",
},
.attach_adapter = w83627ehf_detect, .attach_adapter = w83627ehf_detect,
.detach_client = w83627ehf_detach_client, .detach_client = w83627ehf_detach_client,
}; };
......
...@@ -332,8 +332,10 @@ static struct w83627hf_data *w83627hf_update_device(struct device *dev); ...@@ -332,8 +332,10 @@ static struct w83627hf_data *w83627hf_update_device(struct device *dev);
static void w83627hf_init_client(struct i2c_client *client); static void w83627hf_init_client(struct i2c_client *client);
static struct i2c_driver w83627hf_driver = { static struct i2c_driver w83627hf_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "w83627hf", .name = "w83627hf",
},
.attach_adapter = w83627hf_detect, .attach_adapter = w83627hf_detect,
.detach_client = w83627hf_detach_client, .detach_client = w83627hf_detach_client,
}; };
...@@ -1009,7 +1011,7 @@ static int w83627hf_detect(struct i2c_adapter *adapter) ...@@ -1009,7 +1011,7 @@ static int w83627hf_detect(struct i2c_adapter *adapter)
address = force_addr & WINB_ALIGNMENT; address = force_addr & WINB_ALIGNMENT;
if (!request_region(address + WINB_REGION_OFFSET, WINB_REGION_SIZE, if (!request_region(address + WINB_REGION_OFFSET, WINB_REGION_SIZE,
w83627hf_driver.name)) { w83627hf_driver.driver.name)) {
err = -EBUSY; err = -EBUSY;
goto ERROR0; goto ERROR0;
} }
......
...@@ -269,16 +269,20 @@ static struct w83781d_data *w83781d_update_device(struct device *dev); ...@@ -269,16 +269,20 @@ static struct w83781d_data *w83781d_update_device(struct device *dev);
static void w83781d_init_client(struct i2c_client *client); static void w83781d_init_client(struct i2c_client *client);
static struct i2c_driver w83781d_driver = { static struct i2c_driver w83781d_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "w83781d", .name = "w83781d",
},
.id = I2C_DRIVERID_W83781D, .id = I2C_DRIVERID_W83781D,
.attach_adapter = w83781d_attach_adapter, .attach_adapter = w83781d_attach_adapter,
.detach_client = w83781d_detach_client, .detach_client = w83781d_detach_client,
}; };
static struct i2c_driver w83781d_isa_driver = { static struct i2c_driver w83781d_isa_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "w83781d-isa", .name = "w83781d-isa",
},
.attach_adapter = w83781d_isa_attach_adapter, .attach_adapter = w83781d_isa_attach_adapter,
.detach_client = w83781d_detach_client, .detach_client = w83781d_detach_client,
}; };
...@@ -1011,7 +1015,7 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind) ...@@ -1011,7 +1015,7 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
if (is_isa) if (is_isa)
if (!request_region(address, W83781D_EXTENT, if (!request_region(address, W83781D_EXTENT,
w83781d_isa_driver.name)) { w83781d_isa_driver.driver.name)) {
dev_dbg(&adapter->dev, "Request of region " dev_dbg(&adapter->dev, "Request of region "
"0x%x-0x%x for w83781d failed\n", address, "0x%x-0x%x for w83781d failed\n", address,
address + W83781D_EXTENT - 1); address + W83781D_EXTENT - 1);
......
...@@ -317,8 +317,10 @@ static void w83792d_print_debug(struct w83792d_data *data, struct device *dev); ...@@ -317,8 +317,10 @@ static void w83792d_print_debug(struct w83792d_data *data, struct device *dev);
static void w83792d_init_client(struct i2c_client *client); static void w83792d_init_client(struct i2c_client *client);
static struct i2c_driver w83792d_driver = { static struct i2c_driver w83792d_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "w83792d", .name = "w83792d",
},
.attach_adapter = w83792d_attach_adapter, .attach_adapter = w83792d_attach_adapter,
.detach_client = w83792d_detach_client, .detach_client = w83792d_detach_client,
}; };
......
...@@ -92,8 +92,10 @@ static struct w83l785ts_data *w83l785ts_update_device(struct device *dev); ...@@ -92,8 +92,10 @@ static struct w83l785ts_data *w83l785ts_update_device(struct device *dev);
*/ */
static struct i2c_driver w83l785ts_driver = { static struct i2c_driver w83l785ts_driver = {
.driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "w83l785ts", .name = "w83l785ts",
},
.id = I2C_DRIVERID_W83L785TS, .id = I2C_DRIVERID_W83L785TS,
.attach_adapter = w83l785ts_attach_adapter, .attach_adapter = w83l785ts_attach_adapter,
.detach_client = w83l785ts_detach_client, .detach_client = w83l785ts_detach_client,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment