From d3136dc2b4691dae54ee17a33fcbd7ee62967dcc Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 27 Aug 2003 01:24:53 -0700 Subject: [PATCH] I2C: added new id for Radeon driver. As requested by kronos@kronoz.cjb.net --- include/linux/i2c-id.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 6f12340e8e24..7dc4abf806c2 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h @@ -100,7 +100,7 @@ #define I2C_DRIVERID_STM41T00 52 /* real time clock */ #define I2C_DRIVERID_UDA1342 53 /* UDA1342 audio codec */ #define I2C_DRIVERID_ADV7170 54 /* video encoder */ - +#define I2C_DRIVERID_RADEON 55 /* I2C bus on Radeon boards */ #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ -- cgit v1.2.3 From d364ab90201b18055a8a88ffd816c790fff050fd Mon Sep 17 00:00:00 2001 From: Hirofumi Ogawa Date: Wed, 27 Aug 2003 01:32:28 -0700 Subject: [PATCH] DEVICE_NAME_SIZE/_HALF removal (I2C stuff) --- drivers/i2c/busses/i2c-ali1535.c | 2 +- drivers/i2c/busses/i2c-ali15x3.c | 2 +- drivers/i2c/busses/i2c-amd756.c | 2 +- drivers/i2c/busses/i2c-amd8111.c | 2 +- drivers/i2c/busses/i2c-i801.c | 2 +- drivers/i2c/busses/i2c-nforce2.c | 2 +- drivers/i2c/busses/i2c-piix4.c | 2 +- drivers/i2c/busses/i2c-sis96x.c | 2 +- drivers/i2c/busses/i2c-viapro.c | 2 +- drivers/i2c/chips/adm1021.c | 2 +- drivers/i2c/chips/it87.c | 2 +- drivers/i2c/chips/lm75.c | 2 +- drivers/i2c/chips/lm78.c | 2 +- drivers/i2c/chips/lm85.c | 10 +++++----- drivers/i2c/chips/via686a.c | 2 +- drivers/i2c/chips/w83781d.c | 4 ++-- drivers/i2c/scx200_acb.c | 2 +- include/linux/i2c.h | 6 ++++-- 18 files changed, 26 insertions(+), 24 deletions(-) (limited to 'include/linux') diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c index 33c140678124..aee7d843551b 100644 --- a/drivers/i2c/busses/i2c-ali1535.c +++ b/drivers/i2c/busses/i2c-ali1535.c @@ -507,7 +507,7 @@ static int __devinit ali1535_probe(struct pci_dev *dev, const struct pci_device_ /* set up the driverfs linkage to our parent device */ ali1535_adapter.dev.parent = &dev->dev; - snprintf(ali1535_adapter.name, DEVICE_NAME_SIZE, + snprintf(ali1535_adapter.name, I2C_NAME_SIZE, "SMBus ALI1535 adapter at %04x", ali1535_smba); return i2c_add_adapter(&ali1535_adapter); } diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c index d7e76bc389c9..1e0630ea4e57 100644 --- a/drivers/i2c/busses/i2c-ali15x3.c +++ b/drivers/i2c/busses/i2c-ali15x3.c @@ -498,7 +498,7 @@ static int __devinit ali15x3_probe(struct pci_dev *dev, const struct pci_device_ /* set up the driverfs linkage to our parent device */ ali15x3_adapter.dev.parent = &dev->dev; - snprintf(ali15x3_adapter.name, DEVICE_NAME_SIZE, + snprintf(ali15x3_adapter.name, I2C_NAME_SIZE, "SMBus ALI15X3 adapter at %04x", ali15x3_smba); return i2c_add_adapter(&ali15x3_adapter); } diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c index 1b9ad3179ad6..1e3e787e2de8 100644 --- a/drivers/i2c/busses/i2c-amd756.c +++ b/drivers/i2c/busses/i2c-amd756.c @@ -369,7 +369,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev, /* set up the driverfs linkage to our parent device */ amd756_adapter.dev.parent = &pdev->dev; - snprintf(amd756_adapter.name, DEVICE_NAME_SIZE, + snprintf(amd756_adapter.name, I2C_NAME_SIZE, "SMBus AMD75x adapter at %04x", amd756_ioport); error = i2c_add_adapter(&amd756_adapter); diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c index 9dc1b0a7be79..fc194c55538d 100644 --- a/drivers/i2c/busses/i2c-amd8111.c +++ b/drivers/i2c/busses/i2c-amd8111.c @@ -356,7 +356,7 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_ goto out_kfree; smbus->adapter.owner = THIS_MODULE; - snprintf(smbus->adapter.name, DEVICE_NAME_SIZE, + snprintf(smbus->adapter.name, I2C_NAME_SIZE, "SMBus2 AMD8111 adapter at %04x", smbus->base); smbus->adapter.id = I2C_ALGO_SMBUS | I2C_HW_SMBUS_AMD8111; smbus->adapter.class = I2C_ADAP_CLASS_SMBUS; diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 9ea4927a2b14..2b47ed91c85d 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -598,7 +598,7 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id /* set up the driverfs linkage to our parent device */ i801_adapter.dev.parent = &dev->dev; - snprintf(i801_adapter.name, DEVICE_NAME_SIZE, + snprintf(i801_adapter.name, I2C_NAME_SIZE, "SMBus I801 adapter at %04x", i801_smba); return i2c_add_adapter(&i801_adapter); } diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index e3d997df16ec..a3ab0136cb38 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c @@ -321,7 +321,7 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int reg, smbus->adapter = nforce2_adapter; smbus->adapter.algo_data = smbus; smbus->adapter.dev.parent = &dev->dev; - snprintf(smbus->adapter.name, DEVICE_NAME_SIZE, + snprintf(smbus->adapter.name, I2C_NAME_SIZE, "SMBus nForce2 adapter at %04x", smbus->base); error = i2c_add_adapter(&smbus->adapter); diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index 84d04523dc6f..86b384fd3cf3 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -451,7 +451,7 @@ static int __devinit piix4_probe(struct pci_dev *dev, const struct pci_device_id /* set up the driverfs linkage to our parent device */ piix4_adapter.dev.parent = &dev->dev; - snprintf(piix4_adapter.name, DEVICE_NAME_SIZE, + snprintf(piix4_adapter.name, I2C_NAME_SIZE, "SMBus PIIX4 adapter at %04x", piix4_smba); retval = i2c_add_adapter(&piix4_adapter); diff --git a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c index 4e5a5af9f638..7f8923009544 100644 --- a/drivers/i2c/busses/i2c-sis96x.c +++ b/drivers/i2c/busses/i2c-sis96x.c @@ -318,7 +318,7 @@ static int __devinit sis96x_probe(struct pci_dev *dev, /* set up the driverfs linkage to our parent device */ sis96x_adapter.dev.parent = &dev->dev; - snprintf(sis96x_adapter.name, DEVICE_NAME_SIZE, + snprintf(sis96x_adapter.name, I2C_NAME_SIZE, "SiS96x SMBus adapter at 0x%04x", sis96x_smbus_base); if ((retval = i2c_add_adapter(&sis96x_adapter))) { diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index b4238dcba725..d95f6d89cd29 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c @@ -376,7 +376,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev, dev_dbg(&pdev->dev, "VT596_smba = 0x%X\n", vt596_smba); vt596_adapter.dev.parent = &pdev->dev; - snprintf(vt596_adapter.name, DEVICE_NAME_SIZE, + snprintf(vt596_adapter.name, I2C_NAME_SIZE, "SMBus Via Pro adapter at %04x", vt596_smba); return i2c_add_adapter(&vt596_adapter); diff --git a/drivers/i2c/chips/adm1021.c b/drivers/i2c/chips/adm1021.c index f947a54fae75..a7e02cacd894 100644 --- a/drivers/i2c/chips/adm1021.c +++ b/drivers/i2c/chips/adm1021.c @@ -320,7 +320,7 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind) } /* Fill in the remaining client fields and put it into the global list */ - strlcpy(new_client->name, client_name, DEVICE_NAME_SIZE); + strlcpy(new_client->name, client_name, I2C_NAME_SIZE); data->type = kind; new_client->id = adm1021_id++; diff --git a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c index 16181e1fea9c..89b50d805bc9 100644 --- a/drivers/i2c/chips/it87.c +++ b/drivers/i2c/chips/it87.c @@ -692,7 +692,7 @@ int it87_detect(struct i2c_adapter *adapter, int address, int kind) } /* Fill in the remaining client fields and put it into the global list */ - strlcpy(new_client->name, name, DEVICE_NAME_SIZE); + strlcpy(new_client->name, name, I2C_NAME_SIZE); data->type = kind; diff --git a/drivers/i2c/chips/lm75.c b/drivers/i2c/chips/lm75.c index e1ee02327b8e..e37dd5d8ca98 100644 --- a/drivers/i2c/chips/lm75.c +++ b/drivers/i2c/chips/lm75.c @@ -194,7 +194,7 @@ static int lm75_detect(struct i2c_adapter *adapter, int address, int kind) } /* Fill in the remaining client fields and put it into the global list */ - strlcpy(new_client->name, name, DEVICE_NAME_SIZE); + strlcpy(new_client->name, name, I2C_NAME_SIZE); new_client->id = lm75_id++; data->valid = 0; diff --git a/drivers/i2c/chips/lm78.c b/drivers/i2c/chips/lm78.c index ccca9415d448..ad13af2ebc0b 100644 --- a/drivers/i2c/chips/lm78.c +++ b/drivers/i2c/chips/lm78.c @@ -638,7 +638,7 @@ int lm78_detect(struct i2c_adapter *adapter, int address, int kind) } /* Fill in the remaining client fields and put into the global list */ - strlcpy(new_client->name, client_name, DEVICE_NAME_SIZE); + strlcpy(new_client->name, client_name, I2C_NAME_SIZE); data->type = kind; data->valid = 0; diff --git a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c index e700a01376ea..769c71c910c0 100644 --- a/drivers/i2c/chips/lm85.c +++ b/drivers/i2c/chips/lm85.c @@ -853,19 +853,19 @@ int lm85_detect(struct i2c_adapter *adapter, int address, /* Fill in the chip specific driver values */ if ( kind == any_chip ) { type_name = "lm85"; - strlcpy(new_client->name, "Generic LM85", DEVICE_NAME_SIZE); + strlcpy(new_client->name, "Generic LM85", I2C_NAME_SIZE); } else if ( kind == lm85b ) { type_name = "lm85b"; - strlcpy(new_client->name, "National LM85-B", DEVICE_NAME_SIZE); + strlcpy(new_client->name, "National LM85-B", I2C_NAME_SIZE); } else if ( kind == lm85c ) { type_name = "lm85c"; - strlcpy(new_client->name, "National LM85-C", DEVICE_NAME_SIZE); + strlcpy(new_client->name, "National LM85-C", I2C_NAME_SIZE); } else if ( kind == adm1027 ) { type_name = "adm1027"; - strlcpy(new_client->name, "Analog Devices ADM1027", DEVICE_NAME_SIZE); + strlcpy(new_client->name, "Analog Devices ADM1027", I2C_NAME_SIZE); } else if ( kind == adt7463 ) { type_name = "adt7463"; - strlcpy(new_client->name, "Analog Devices ADT7463", DEVICE_NAME_SIZE); + strlcpy(new_client->name, "Analog Devices ADT7463", I2C_NAME_SIZE); } else { dev_dbg(&adapter->dev, "Internal error, invalid kind (%d)!", kind); err = -EFAULT ; diff --git a/drivers/i2c/chips/via686a.c b/drivers/i2c/chips/via686a.c index d5d36c6bb21a..cbd11d1acfae 100644 --- a/drivers/i2c/chips/via686a.c +++ b/drivers/i2c/chips/via686a.c @@ -727,7 +727,7 @@ static int via686a_detect(struct i2c_adapter *adapter, int address, int kind) new_client->dev.parent = &adapter->dev; /* Fill in the remaining client fields and put into the global list */ - snprintf(new_client->name, DEVICE_NAME_SIZE, client_name); + snprintf(new_client->name, I2C_NAME_SIZE, client_name); data->valid = 0; init_MUTEX(&data->update_lock); diff --git a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c index bfbe794eb687..056ac7b0aef4 100644 --- a/drivers/i2c/chips/w83781d.c +++ b/drivers/i2c/chips/w83781d.c @@ -1117,7 +1117,7 @@ w83781d_detect_subclients(struct i2c_adapter *adapter, int address, int kind, data->lm75[i]->driver = &w83781d_driver; data->lm75[i]->flags = 0; strlcpy(data->lm75[i]->name, client_name, - DEVICE_NAME_SIZE); + I2C_NAME_SIZE); if ((err = i2c_attach_client(data->lm75[i]))) { dev_err(&new_client->dev, "Subclient %d " "registration at address 0x%x " @@ -1326,7 +1326,7 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind) } /* Fill in the remaining client fields and put into the global list */ - strlcpy(new_client->name, client_name, DEVICE_NAME_SIZE); + strlcpy(new_client->name, client_name, I2C_NAME_SIZE); data->type = kind; data->valid = 0; diff --git a/drivers/i2c/scx200_acb.c b/drivers/i2c/scx200_acb.c index 34a6db05f7f2..64112d8672e4 100644 --- a/drivers/i2c/scx200_acb.c +++ b/drivers/i2c/scx200_acb.c @@ -456,7 +456,7 @@ static int __init scx200_acb_create(int base, int index) memset(iface, 0, sizeof(*iface)); adapter = &iface->adapter; i2c_set_adapdata(adapter, iface); - snprintf(adapter->name, DEVICE_NAME_SIZE, "SCx200 ACB%d", index); + snprintf(adapter->name, I2C_NAME_SIZE, "SCx200 ACB%d", index); adapter->owner = THIS_MODULE; adapter->id = I2C_ALGO_SMBUS; adapter->algo = &scx200_acb_algorithm; diff --git a/include/linux/i2c.h b/include/linux/i2c.h index f2dc147bda89..2bfab00071ca 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -146,6 +146,8 @@ struct i2c_driver { extern struct bus_type i2c_bus_type; +#define I2C_NAME_SIZE 50 + /* * i2c_client identifies a single device (i.e. chip) that is connected to an * i2c bus. The behaviour is defined by the routines of the driver. This @@ -166,7 +168,7 @@ struct i2c_client { /* to the client */ struct device dev; /* the device structure */ struct list_head list; - char name[DEVICE_NAME_SIZE]; + char name[I2C_NAME_SIZE]; struct completion released; }; #define to_i2c_client(d) container_of(d, struct i2c_client, dev) @@ -253,7 +255,7 @@ struct i2c_adapter { int nr; struct list_head clients; struct list_head list; - char name[DEVICE_NAME_SIZE]; + char name[I2C_NAME_SIZE]; struct completion dev_released; struct completion class_dev_released; }; -- cgit v1.2.3