diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-09-25 10:37:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 17:02:06 -0400 |
commit | d6072f842a77014220683ee5b781b7cee8f020d1 (patch) | |
tree | d9409d911987815a73f6c08e1f1f67fe4d16bb3a /drivers/i2c/busses/i2c-sis5595.c | |
parent | 7d845b10d06fa20a595a5161edabc5e846ed28a6 (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/busses/i2c-sis5595.c')
-rw-r--r-- | drivers/i2c/busses/i2c-sis5595.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; | |||
127 | module_param(force_addr, ushort, 0); | 127 | module_param(force_addr, ushort, 0); |
128 | MODULE_PARM_DESC(force_addr, "Initialize the base address of the i2c controller"); | 128 | MODULE_PARM_DESC(force_addr, "Initialize the base address of the i2c controller"); |
129 | 129 | ||
130 | static struct pci_driver sis5595_driver; | ||
130 | static unsigned short sis5595_base; | 131 | static unsigned short sis5595_base; |
131 | 132 | ||
132 | static u8 sis5595_read(u8 reg) | 133 | static 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 = { | |||
364 | static struct i2c_adapter sis5595_adapter = { | 366 | static 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 | ||