aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/scx200_acb.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-05-01 23:26:28 +0200
committerJean Delvare <khali@hyperion.delvare>2007-05-01 23:26:28 +0200
commit2096b956d24c4b5950b808fc23b218425d79ebb1 (patch)
tree9e2c09c2e40c65bd56cbfd50955d5c7355474655 /drivers/i2c/busses/scx200_acb.c
parent4ad4eac60667f7c321faae28a3437f7a8b3d17cb (diff)
downloadkernel_samsung_smdk4412-2096b956d24c4b5950b808fc23b218425d79ebb1.zip
kernel_samsung_smdk4412-2096b956d24c4b5950b808fc23b218425d79ebb1.tar.gz
kernel_samsung_smdk4412-2096b956d24c4b5950b808fc23b218425d79ebb1.tar.bz2
i2c: Shrink struct i2c_client
This shrinks the size of "struct i2c_client" by 40 bytes: - Substantially shrinks the string used to identify the chip type - The "flags" don't need to be so big - Removes some internal padding It also adds kerneldoc for that struct, explaining how "name" is really a chip type identifier; it's otherwise potentially confusing. Because the I2C_NAME_SIZE symbol was abused for both i2c_client.name and for i2c_adapter.name, this needed to affect i2c_adapter too. The adapters which used that symbol now use the more-obviously-correct idiom of taking the size of that field. JD: Shorten i2c_adapter.name from 50 to 48 bytes while we're here, to avoid wasting space in padding. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses/scx200_acb.c')
-rw-r--r--drivers/i2c/busses/scx200_acb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 0b082c5..d816ab0 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -441,7 +441,7 @@ static __init struct scx200_acb_iface *scx200_create_iface(const char *text,
adapter = &iface->adapter;
i2c_set_adapdata(adapter, iface);
- snprintf(adapter->name, I2C_NAME_SIZE, "%s ACB%d", text, index);
+ snprintf(adapter->name, sizeof(adapter->name), "%s ACB%d", text, index);
adapter->owner = THIS_MODULE;
adapter->id = I2C_HW_SMBUS_SCX200;
adapter->algo = &scx200_acb_algorithm;