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-ali15x3.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-ali15x3.c')
-rw-r--r-- | drivers/i2c/busses/i2c-ali15x3.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); | |||
130 | MODULE_PARM_DESC(force_addr, | 130 | MODULE_PARM_DESC(force_addr, |
131 | "Initialize the base address of the i2c controller"); | 131 | "Initialize the base address of the i2c controller"); |
132 | 132 | ||
133 | static struct pci_driver ali15x3_driver; | ||
133 | static unsigned short ali15x3_smba; | 134 | static unsigned short ali15x3_smba; |
134 | 135 | ||
135 | static int ali15x3_setup(struct pci_dev *ALI15X3_dev) | 136 | static 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 | ||
476 | static struct pci_device_id ali15x3_ids[] = { | 477 | static struct pci_device_id ali15x3_ids[] = { |