[PATCH] I2C: Drop I2C_DEVNAME and i2c_clientname
I2C_DEVNAME and i2c_clientname were introduced in 2.5.68 [1] to help media/video driver authors who wanted their code to be compatible with both Linux 2.4 and 2.6. The cause of the incompatibility has gone since [2], so I think we can get rid of them, as they tend to make the code harder to read and longer to preprocess/compile for no more benefit. I'd hope nobody seriously attempts to keep media/video driver compatible across Linux trees anymore, BTW. [1] http://marc.theaimsgroup.com/?l=linux-kernel&m=104930186524598&w=2 [2] http://www.linuxhq.com/kernel/v2.6/0-test3/include/linux/i2c.h Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
5b5439652a
commit
fae91e72b7
@@ -1523,7 +1523,6 @@ static u32 w9968cf_i2c_func(struct i2c_adapter* adap)
|
||||
static int w9968cf_i2c_attach_inform(struct i2c_client* client)
|
||||
{
|
||||
struct w9968cf_device* cam = i2c_get_adapdata(client->adapter);
|
||||
const char* clientname = i2c_clientname(client);
|
||||
int id = client->driver->id, err = 0;
|
||||
|
||||
if (id == I2C_DRIVERID_OVCAMCHIP) {
|
||||
@@ -1535,12 +1534,12 @@ static int w9968cf_i2c_attach_inform(struct i2c_client* client)
|
||||
}
|
||||
} else {
|
||||
DBG(4, "Rejected client [%s] with driver [%s]",
|
||||
clientname, client->driver->name)
|
||||
client->name, client->driver->name)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
DBG(5, "I2C attach client [%s] with driver [%s]",
|
||||
clientname, client->driver->name)
|
||||
client->name, client->driver->name)
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1549,12 +1548,11 @@ static int w9968cf_i2c_attach_inform(struct i2c_client* client)
|
||||
static int w9968cf_i2c_detach_inform(struct i2c_client* client)
|
||||
{
|
||||
struct w9968cf_device* cam = i2c_get_adapdata(client->adapter);
|
||||
const char* clientname = i2c_clientname(client);
|
||||
|
||||
if (cam->sensor_client == client)
|
||||
cam->sensor_client = NULL;
|
||||
|
||||
DBG(5, "I2C detach client [%s]", clientname)
|
||||
DBG(5, "I2C detach client [%s]", client->name)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user