aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-09-25 10:37:04 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 17:02:06 -0400
commitd6072f842a77014220683ee5b781b7cee8f020d1 (patch)
treed9409d911987815a73f6c08e1f1f67fe4d16bb3a /drivers/i2c
parent7d845b10d06fa20a595a5161edabc5e846ed28a6 (diff)
[PATCH] i2c: Reuse name strings in i2c bus drivers
Clean up name string usage in 12 i2c bus drivers: * Use the i2c_adapter name for requesting the I/O region rather than redefining a new string. * Do not initialize the i2c_adapter name to "unset". This should save a few data bytes here and there. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> drivers/i2c/busses/i2c-ali1535.c | 6 +++--- drivers/i2c/busses/i2c-ali1563.c | 6 ++++-- drivers/i2c/busses/i2c-ali15x3.c | 5 +++-- drivers/i2c/busses/i2c-amd756.c | 5 ++--- drivers/i2c/busses/i2c-amd8111.c | 4 +++- drivers/i2c/busses/i2c-i801.c | 4 ++-- drivers/i2c/busses/i2c-nforce2.c | 4 ++-- drivers/i2c/busses/i2c-piix4.c | 4 ++-- drivers/i2c/busses/i2c-sis5595.c | 5 +++-- drivers/i2c/busses/i2c-sis630.c | 6 ++++-- drivers/i2c/busses/i2c-sis96x.c | 5 +++-- drivers/i2c/busses/i2c-via.c | 4 ++-- 12 files changed, 33 insertions(+), 25 deletions(-)
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-ali1535.c6
-rw-r--r--drivers/i2c/busses/i2c-ali1563.c6
-rw-r--r--drivers/i2c/busses/i2c-ali15x3.c5
-rw-r--r--drivers/i2c/busses/i2c-amd756.c5
-rw-r--r--drivers/i2c/busses/i2c-amd8111.c4
-rw-r--r--drivers/i2c/busses/i2c-i801.c4
-rw-r--r--drivers/i2c/busses/i2c-nforce2.c4
-rw-r--r--drivers/i2c/busses/i2c-piix4.c4
-rw-r--r--drivers/i2c/busses/i2c-sis5595.c5
-rw-r--r--drivers/i2c/busses/i2c-sis630.c6
-rw-r--r--drivers/i2c/busses/i2c-sis96x.c5
-rw-r--r--drivers/i2c/busses/i2c-via.c4
12 files changed, 33 insertions, 25 deletions
diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c
index f021acd2674e..3eb47890db40 100644
--- a/drivers/i2c/busses/i2c-ali1535.c
+++ b/drivers/i2c/busses/i2c-ali1535.c
@@ -134,7 +134,7 @@
134 /* -> Read = 1 */ 134 /* -> Read = 1 */
135#define ALI1535_SMBIO_EN 0x04 /* SMB I/O Space enable */ 135#define ALI1535_SMBIO_EN 0x04 /* SMB I/O Space enable */
136 136
137 137static struct pci_driver ali1535_driver;
138static unsigned short ali1535_smba; 138static unsigned short ali1535_smba;
139static DECLARE_MUTEX(i2c_ali1535_sem); 139static DECLARE_MUTEX(i2c_ali1535_sem);
140 140
@@ -162,7 +162,8 @@ static int ali1535_setup(struct pci_dev *dev)
162 goto exit; 162 goto exit;
163 } 163 }
164 164
165 if (!request_region(ali1535_smba, ALI1535_SMB_IOSIZE, "ali1535-smb")) { 165 if (!request_region(ali1535_smba, ALI1535_SMB_IOSIZE,
166 ali1535_driver.name)) {
166 dev_err(&dev->dev, "ALI1535_smb region 0x%x already in use!\n", 167 dev_err(&dev->dev, "ALI1535_smb region 0x%x already in use!\n",
167 ali1535_smba); 168 ali1535_smba);
168 goto exit; 169 goto exit;
@@ -480,7 +481,6 @@ static struct i2c_adapter ali1535_adapter = {
480 .owner = THIS_MODULE, 481 .owner = THIS_MODULE,
481 .class = I2C_CLASS_HWMON, 482 .class = I2C_CLASS_HWMON,
482 .algo = &smbus_algorithm, 483 .algo = &smbus_algorithm,
483 .name = "unset",
484}; 484};
485 485
486static struct pci_device_id ali1535_ids[] = { 486static struct pci_device_id ali1535_ids[] = {
diff --git a/drivers/i2c/busses/i2c-ali1563.c b/drivers/i2c/busses/i2c-ali1563.c
index 86947504aea1..e6f63208fc4a 100644
--- a/drivers/i2c/busses/i2c-ali1563.c
+++ b/drivers/i2c/busses/i2c-ali1563.c
@@ -60,6 +60,7 @@
60 60
61#define HST_CNTL2_SIZEMASK 0x38 61#define HST_CNTL2_SIZEMASK 0x38
62 62
63static struct pci_driver ali1563_pci_driver;
63static unsigned short ali1563_smba; 64static unsigned short ali1563_smba;
64 65
65static int ali1563_transaction(struct i2c_adapter * a, int size) 66static int ali1563_transaction(struct i2c_adapter * a, int size)
@@ -350,7 +351,8 @@ static int __devinit ali1563_setup(struct pci_dev * dev)
350 dev_warn(&dev->dev,"ali1563_smba Uninitialized\n"); 351 dev_warn(&dev->dev,"ali1563_smba Uninitialized\n");
351 goto Err; 352 goto Err;
352 } 353 }
353 if (!request_region(ali1563_smba,ALI1563_SMB_IOSIZE,"i2c-ali1563")) { 354 if (!request_region(ali1563_smba, ALI1563_SMB_IOSIZE,
355 ali1563_pci_driver.name)) {
354 dev_warn(&dev->dev,"Could not allocate I/O space"); 356 dev_warn(&dev->dev,"Could not allocate I/O space");
355 goto Err; 357 goto Err;
356 } 358 }
@@ -406,7 +408,7 @@ static struct pci_device_id __devinitdata ali1563_id_table[] = {
406MODULE_DEVICE_TABLE (pci, ali1563_id_table); 408MODULE_DEVICE_TABLE (pci, ali1563_id_table);
407 409
408static struct pci_driver ali1563_pci_driver = { 410static struct pci_driver ali1563_pci_driver = {
409 .name = "ali1563_i2c", 411 .name = "ali1563_smbus",
410 .id_table = ali1563_id_table, 412 .id_table = ali1563_id_table,
411 .probe = ali1563_probe, 413 .probe = ali1563_probe,
412 .remove = __devexit_p(ali1563_remove), 414 .remove = __devexit_p(ali1563_remove),
diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c
index e13d60c120b9..7a5c0941dbc1 100644
--- a/drivers/i2c/busses/i2c-ali15x3.c
+++ b/drivers/i2c/busses/i2c-ali15x3.c
@@ -130,6 +130,7 @@ module_param(force_addr, ushort, 0);
130MODULE_PARM_DESC(force_addr, 130MODULE_PARM_DESC(force_addr,
131 "Initialize the base address of the i2c controller"); 131 "Initialize the base address of the i2c controller");
132 132
133static struct pci_driver ali15x3_driver;
133static unsigned short ali15x3_smba; 134static unsigned short ali15x3_smba;
134 135
135static int ali15x3_setup(struct pci_dev *ALI15X3_dev) 136static int ali15x3_setup(struct pci_dev *ALI15X3_dev)
@@ -166,7 +167,8 @@ static int ali15x3_setup(struct pci_dev *ALI15X3_dev)
166 if(force_addr) 167 if(force_addr)
167 ali15x3_smba = force_addr & ~(ALI15X3_SMB_IOSIZE - 1); 168 ali15x3_smba = force_addr & ~(ALI15X3_SMB_IOSIZE - 1);
168 169
169 if (!request_region(ali15x3_smba, ALI15X3_SMB_IOSIZE, "ali15x3-smb")) { 170 if (!request_region(ali15x3_smba, ALI15X3_SMB_IOSIZE,
171 ali15x3_driver.name)) {
170 dev_err(&ALI15X3_dev->dev, 172 dev_err(&ALI15X3_dev->dev,
171 "ALI15X3_smb region 0x%x already in use!\n", 173 "ALI15X3_smb region 0x%x already in use!\n",
172 ali15x3_smba); 174 ali15x3_smba);
@@ -470,7 +472,6 @@ static struct i2c_adapter ali15x3_adapter = {
470 .owner = THIS_MODULE, 472 .owner = THIS_MODULE,
471 .class = I2C_CLASS_HWMON, 473 .class = I2C_CLASS_HWMON,
472 .algo = &smbus_algorithm, 474 .algo = &smbus_algorithm,
473 .name = "unset",
474}; 475};
475 476
476static struct pci_device_id ali15x3_ids[] = { 477static struct pci_device_id ali15x3_ids[] = {
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
index 3bbac2f8ce38..1750dedaf4b5 100644
--- a/drivers/i2c/busses/i2c-amd756.c
+++ b/drivers/i2c/busses/i2c-amd756.c
@@ -85,7 +85,7 @@
85#define AMD756_PROCESS_CALL 0x04 85#define AMD756_PROCESS_CALL 0x04
86#define AMD756_BLOCK_DATA 0x05 86#define AMD756_BLOCK_DATA 0x05
87 87
88 88static struct pci_driver amd756_driver;
89static unsigned short amd756_ioport; 89static unsigned short amd756_ioport;
90 90
91/* 91/*
@@ -303,7 +303,6 @@ struct i2c_adapter amd756_smbus = {
303 .owner = THIS_MODULE, 303 .owner = THIS_MODULE,
304 .class = I2C_CLASS_HWMON, 304 .class = I2C_CLASS_HWMON,
305 .algo = &smbus_algorithm, 305 .algo = &smbus_algorithm,
306 .name = "unset",
307}; 306};
308 307
309enum chiptype { AMD756, AMD766, AMD768, NFORCE, AMD8111 }; 308enum chiptype { AMD756, AMD766, AMD768, NFORCE, AMD8111 };
@@ -365,7 +364,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev,
365 amd756_ioport += SMB_ADDR_OFFSET; 364 amd756_ioport += SMB_ADDR_OFFSET;
366 } 365 }
367 366
368 if (!request_region(amd756_ioport, SMB_IOSIZE, "amd756-smbus")) { 367 if (!request_region(amd756_ioport, SMB_IOSIZE, amd756_driver.name)) {
369 dev_err(&pdev->dev, "SMB region 0x%x already in use!\n", 368 dev_err(&pdev->dev, "SMB region 0x%x already in use!\n",
370 amd756_ioport); 369 amd756_ioport);
371 return -ENODEV; 370 return -ENODEV;
diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
index 45ea24ba14d5..49ff11e5134f 100644
--- a/drivers/i2c/busses/i2c-amd8111.c
+++ b/drivers/i2c/busses/i2c-amd8111.c
@@ -30,6 +30,8 @@ struct amd_smbus {
30 int size; 30 int size;
31}; 31};
32 32
33static struct pci_driver amd8111_driver;
34
33/* 35/*
34 * AMD PCI control registers definitions. 36 * AMD PCI control registers definitions.
35 */ 37 */
@@ -352,7 +354,7 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_
352 smbus->base = pci_resource_start(dev, 0); 354 smbus->base = pci_resource_start(dev, 0);
353 smbus->size = pci_resource_len(dev, 0); 355 smbus->size = pci_resource_len(dev, 0);
354 356
355 if (!request_region(smbus->base, smbus->size, "amd8111 SMBus 2.0")) 357 if (!request_region(smbus->base, smbus->size, amd8111_driver.name))
356 goto out_kfree; 358 goto out_kfree;
357 359
358 smbus->adapter.owner = THIS_MODULE; 360 smbus->adapter.owner = THIS_MODULE;
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 709beab76609..588583530c9f 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -110,6 +110,7 @@ static int i801_block_transaction(union i2c_smbus_data *data,
110 char read_write, int command); 110 char read_write, int command);
111 111
112static unsigned short i801_smba; 112static unsigned short i801_smba;
113static struct pci_driver i801_driver;
113static struct pci_dev *I801_dev; 114static struct pci_dev *I801_dev;
114static int isich4; 115static int isich4;
115 116
@@ -143,7 +144,7 @@ static int i801_setup(struct pci_dev *dev)
143 } 144 }
144 } 145 }
145 146
146 if (!request_region(i801_smba, (isich4 ? 16 : 8), "i801-smbus")) { 147 if (!request_region(i801_smba, (isich4 ? 16 : 8), i801_driver.name)) {
147 dev_err(&dev->dev, "I801_smb region 0x%x already in use!\n", 148 dev_err(&dev->dev, "I801_smb region 0x%x already in use!\n",
148 i801_smba); 149 i801_smba);
149 error_return = -EBUSY; 150 error_return = -EBUSY;
@@ -543,7 +544,6 @@ static struct i2c_adapter i801_adapter = {
543 .owner = THIS_MODULE, 544 .owner = THIS_MODULE,
544 .class = I2C_CLASS_HWMON, 545 .class = I2C_CLASS_HWMON,
545 .algo = &smbus_algorithm, 546 .algo = &smbus_algorithm,
546 .name = "unset",
547}; 547};
548 548
549static struct pci_device_id i801_ids[] = { 549static struct pci_device_id i801_ids[] = {
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index fe9c0f42a2b7..dd4b6d8e03ef 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -97,6 +97,7 @@ struct nforce2_smbus {
97#define NVIDIA_SMB_PRTCL_I2C_BLOCK_DATA 0x4a 97#define NVIDIA_SMB_PRTCL_I2C_BLOCK_DATA 0x4a
98#define NVIDIA_SMB_PRTCL_PEC 0x80 98#define NVIDIA_SMB_PRTCL_PEC 0x80
99 99
100static struct pci_driver nforce2_driver;
100 101
101static s32 nforce2_access(struct i2c_adapter *adap, u16 addr, 102static s32 nforce2_access(struct i2c_adapter *adap, u16 addr,
102 unsigned short flags, char read_write, 103 unsigned short flags, char read_write,
@@ -113,7 +114,6 @@ static struct i2c_adapter nforce2_adapter = {
113 .owner = THIS_MODULE, 114 .owner = THIS_MODULE,
114 .class = I2C_CLASS_HWMON, 115 .class = I2C_CLASS_HWMON,
115 .algo = &smbus_algorithm, 116 .algo = &smbus_algorithm,
116 .name = "unset",
117}; 117};
118 118
119/* Return -1 on error. See smbus.h for more information */ 119/* Return -1 on error. See smbus.h for more information */
@@ -285,7 +285,7 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int reg,
285 smbus->base = iobase & 0xfffc; 285 smbus->base = iobase & 0xfffc;
286 smbus->size = 8; 286 smbus->size = 8;
287 287
288 if (!request_region(smbus->base, smbus->size, "nForce2 SMBus")) { 288 if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) {
289 dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n", 289 dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n",
290 smbus->base, smbus->base+smbus->size-1, name); 290 smbus->base, smbus->base+smbus->size-1, name);
291 return -1; 291 return -1;
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index 1b2d3ebd1075..692f47345481 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -112,6 +112,7 @@ MODULE_PARM_DESC(fix_hstcfg,
112static int piix4_transaction(void); 112static int piix4_transaction(void);
113 113
114static unsigned short piix4_smba; 114static unsigned short piix4_smba;
115static struct pci_driver piix4_driver;
115static struct i2c_adapter piix4_adapter; 116static struct i2c_adapter piix4_adapter;
116 117
117static struct dmi_system_id __devinitdata piix4_dmi_table[] = { 118static struct dmi_system_id __devinitdata piix4_dmi_table[] = {
@@ -157,7 +158,7 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev,
157 } 158 }
158 } 159 }
159 160
160 if (!request_region(piix4_smba, SMBIOSIZE, "piix4-smbus")) { 161 if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) {
161 dev_err(&PIIX4_dev->dev, "SMB region 0x%x already in use!\n", 162 dev_err(&PIIX4_dev->dev, "SMB region 0x%x already in use!\n",
162 piix4_smba); 163 piix4_smba);
163 return -ENODEV; 164 return -ENODEV;
@@ -407,7 +408,6 @@ static struct i2c_adapter piix4_adapter = {
407 .owner = THIS_MODULE, 408 .owner = THIS_MODULE,
408 .class = I2C_CLASS_HWMON, 409 .class = I2C_CLASS_HWMON,
409 .algo = &smbus_algorithm, 410 .algo = &smbus_algorithm,
410 .name = "unset",
411}; 411};
412 412
413static struct pci_device_id piix4_ids[] = { 413static struct pci_device_id piix4_ids[] = {
diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c
index 3fd38f4673e3..b57ab74d23ec 100644
--- a/drivers/i2c/busses/i2c-sis5595.c
+++ b/drivers/i2c/busses/i2c-sis5595.c
@@ -127,6 +127,7 @@ static u16 force_addr;
127module_param(force_addr, ushort, 0); 127module_param(force_addr, ushort, 0);
128MODULE_PARM_DESC(force_addr, "Initialize the base address of the i2c controller"); 128MODULE_PARM_DESC(force_addr, "Initialize the base address of the i2c controller");
129 129
130static struct pci_driver sis5595_driver;
130static unsigned short sis5595_base; 131static unsigned short sis5595_base;
131 132
132static u8 sis5595_read(u8 reg) 133static u8 sis5595_read(u8 reg)
@@ -172,7 +173,8 @@ static int sis5595_setup(struct pci_dev *SIS5595_dev)
172 173
173 /* NB: We grab just the two SMBus registers here, but this may still 174 /* NB: We grab just the two SMBus registers here, but this may still
174 * interfere with ACPI :-( */ 175 * interfere with ACPI :-( */
175 if (!request_region(sis5595_base + SMB_INDEX, 2, "sis5595-smbus")) { 176 if (!request_region(sis5595_base + SMB_INDEX, 2,
177 sis5595_driver.name)) {
176 dev_err(&SIS5595_dev->dev, "SMBus registers 0x%04x-0x%04x already in use!\n", 178 dev_err(&SIS5595_dev->dev, "SMBus registers 0x%04x-0x%04x already in use!\n",
177 sis5595_base + SMB_INDEX, sis5595_base + SMB_INDEX + 1); 179 sis5595_base + SMB_INDEX, sis5595_base + SMB_INDEX + 1);
178 return -ENODEV; 180 return -ENODEV;
@@ -364,7 +366,6 @@ static struct i2c_algorithm smbus_algorithm = {
364static struct i2c_adapter sis5595_adapter = { 366static struct i2c_adapter sis5595_adapter = {
365 .owner = THIS_MODULE, 367 .owner = THIS_MODULE,
366 .class = I2C_CLASS_HWMON, 368 .class = I2C_CLASS_HWMON,
367 .name = "unset",
368 .algo = &smbus_algorithm, 369 .algo = &smbus_algorithm,
369}; 370};
370 371
diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
index 44c4e68e9a98..acb75e282414 100644
--- a/drivers/i2c/busses/i2c-sis630.c
+++ b/drivers/i2c/busses/i2c-sis630.c
@@ -92,6 +92,8 @@
92#define SIS630_PCALL 0x04 92#define SIS630_PCALL 0x04
93#define SIS630_BLOCK_DATA 0x05 93#define SIS630_BLOCK_DATA 0x05
94 94
95static struct pci_driver sis630_driver;
96
95/* insmod parameters */ 97/* insmod parameters */
96static int high_clock; 98static int high_clock;
97static int force; 99static int force;
@@ -432,7 +434,8 @@ static int sis630_setup(struct pci_dev *sis630_dev)
432 dev_dbg(&sis630_dev->dev, "ACPI base at 0x%04x\n", acpi_base); 434 dev_dbg(&sis630_dev->dev, "ACPI base at 0x%04x\n", acpi_base);
433 435
434 /* Everything is happy, let's grab the memory and set things up. */ 436 /* Everything is happy, let's grab the memory and set things up. */
435 if (!request_region(acpi_base + SMB_STS, SIS630_SMB_IOREGION, "sis630-smbus")) { 437 if (!request_region(acpi_base + SMB_STS, SIS630_SMB_IOREGION,
438 sis630_driver.name)) {
436 dev_err(&sis630_dev->dev, "SMBus registers 0x%04x-0x%04x already " 439 dev_err(&sis630_dev->dev, "SMBus registers 0x%04x-0x%04x already "
437 "in use!\n", acpi_base + SMB_STS, acpi_base + SMB_SAA); 440 "in use!\n", acpi_base + SMB_STS, acpi_base + SMB_SAA);
438 goto exit; 441 goto exit;
@@ -455,7 +458,6 @@ static struct i2c_algorithm smbus_algorithm = {
455static struct i2c_adapter sis630_adapter = { 458static struct i2c_adapter sis630_adapter = {
456 .owner = THIS_MODULE, 459 .owner = THIS_MODULE,
457 .class = I2C_CLASS_HWMON, 460 .class = I2C_CLASS_HWMON,
458 .name = "unset",
459 .algo = &smbus_algorithm, 461 .algo = &smbus_algorithm,
460}; 462};
461 463
diff --git a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c
index 9ddd910c3b99..3024907cdafe 100644
--- a/drivers/i2c/busses/i2c-sis96x.c
+++ b/drivers/i2c/busses/i2c-sis96x.c
@@ -82,6 +82,7 @@
82#define SIS96x_PROC_CALL 0x04 82#define SIS96x_PROC_CALL 0x04
83#define SIS96x_BLOCK_DATA 0x05 83#define SIS96x_BLOCK_DATA 0x05
84 84
85static struct pci_driver sis96x_driver;
85static struct i2c_adapter sis96x_adapter; 86static struct i2c_adapter sis96x_adapter;
86static u16 sis96x_smbus_base; 87static u16 sis96x_smbus_base;
87 88
@@ -257,7 +258,6 @@ static struct i2c_adapter sis96x_adapter = {
257 .owner = THIS_MODULE, 258 .owner = THIS_MODULE,
258 .class = I2C_CLASS_HWMON, 259 .class = I2C_CLASS_HWMON,
259 .algo = &smbus_algorithm, 260 .algo = &smbus_algorithm,
260 .name = "unset",
261}; 261};
262 262
263static struct pci_device_id sis96x_ids[] = { 263static struct pci_device_id sis96x_ids[] = {
@@ -294,7 +294,8 @@ static int __devinit sis96x_probe(struct pci_dev *dev,
294 sis96x_smbus_base); 294 sis96x_smbus_base);
295 295
296 /* Everything is happy, let's grab the memory and set things up. */ 296 /* Everything is happy, let's grab the memory and set things up. */
297 if (!request_region(sis96x_smbus_base, SMB_IOSIZE, "sis96x-smbus")) { 297 if (!request_region(sis96x_smbus_base, SMB_IOSIZE,
298 sis96x_driver.name)) {
298 dev_err(&dev->dev, "SMBus registers 0x%04x-0x%04x " 299 dev_err(&dev->dev, "SMBus registers 0x%04x-0x%04x "
299 "already in use!\n", sis96x_smbus_base, 300 "already in use!\n", sis96x_smbus_base,
300 sis96x_smbus_base + SMB_IOSIZE - 1); 301 sis96x_smbus_base + SMB_IOSIZE - 1);
diff --git a/drivers/i2c/busses/i2c-via.c b/drivers/i2c/busses/i2c-via.c
index 0b3edd4e6c12..484bbacfce6b 100644
--- a/drivers/i2c/busses/i2c-via.c
+++ b/drivers/i2c/busses/i2c-via.c
@@ -43,8 +43,8 @@
43 43
44/* io-region reservation */ 44/* io-region reservation */
45#define IOSPACE 0x06 45#define IOSPACE 0x06
46#define IOTEXT "via-i2c"
47 46
47static struct pci_driver vt586b_driver;
48static u16 pm_io_base; 48static u16 pm_io_base;
49 49
50/* 50/*
@@ -130,7 +130,7 @@ static int __devinit vt586b_probe(struct pci_dev *dev, const struct pci_device_i
130 pci_read_config_word(dev, base, &pm_io_base); 130 pci_read_config_word(dev, base, &pm_io_base);
131 pm_io_base &= (0xff << 8); 131 pm_io_base &= (0xff << 8);
132 132
133 if (!request_region(I2C_DIR, IOSPACE, IOTEXT)) { 133 if (!request_region(I2C_DIR, IOSPACE, vt586b_driver.name)) {
134 dev_err(&dev->dev, "IO 0x%x-0x%x already in use\n", I2C_DIR, I2C_DIR + IOSPACE); 134 dev_err(&dev->dev, "IO 0x%x-0x%x already in use\n", I2C_DIR, I2C_DIR + IOSPACE);
135 return -ENODEV; 135 return -ENODEV;
136 } 136 }