diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-08-15 13:57:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-05 12:14:35 -0400 |
commit | fae91e72b79ba9a21f0ce7551a1fd7e8984c85a6 (patch) | |
tree | 1db62e590a010d7ece7f170aedbcc72c8f126122 /drivers/usb/media/w9968cf.c | |
parent | 5b5439652af79106b792faf79b2c1e787e143ba0 (diff) |
[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>
Diffstat (limited to 'drivers/usb/media/w9968cf.c')
-rw-r--r-- | drivers/usb/media/w9968cf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/media/w9968cf.c b/drivers/usb/media/w9968cf.c index 83e8dd627154..f36c0b6c6e36 100644 --- a/drivers/usb/media/w9968cf.c +++ b/drivers/usb/media/w9968cf.c | |||
@@ -1523,7 +1523,6 @@ static u32 w9968cf_i2c_func(struct i2c_adapter* adap) | |||
1523 | static int w9968cf_i2c_attach_inform(struct i2c_client* client) | 1523 | static int w9968cf_i2c_attach_inform(struct i2c_client* client) |
1524 | { | 1524 | { |
1525 | struct w9968cf_device* cam = i2c_get_adapdata(client->adapter); | 1525 | struct w9968cf_device* cam = i2c_get_adapdata(client->adapter); |
1526 | const char* clientname = i2c_clientname(client); | ||
1527 | int id = client->driver->id, err = 0; | 1526 | int id = client->driver->id, err = 0; |
1528 | 1527 | ||
1529 | if (id == I2C_DRIVERID_OVCAMCHIP) { | 1528 | if (id == I2C_DRIVERID_OVCAMCHIP) { |
@@ -1535,12 +1534,12 @@ static int w9968cf_i2c_attach_inform(struct i2c_client* client) | |||
1535 | } | 1534 | } |
1536 | } else { | 1535 | } else { |
1537 | DBG(4, "Rejected client [%s] with driver [%s]", | 1536 | DBG(4, "Rejected client [%s] with driver [%s]", |
1538 | clientname, client->driver->name) | 1537 | client->name, client->driver->name) |
1539 | return -EINVAL; | 1538 | return -EINVAL; |
1540 | } | 1539 | } |
1541 | 1540 | ||
1542 | DBG(5, "I2C attach client [%s] with driver [%s]", | 1541 | DBG(5, "I2C attach client [%s] with driver [%s]", |
1543 | clientname, client->driver->name) | 1542 | client->name, client->driver->name) |
1544 | 1543 | ||
1545 | return 0; | 1544 | return 0; |
1546 | } | 1545 | } |
@@ -1549,12 +1548,11 @@ static int w9968cf_i2c_attach_inform(struct i2c_client* client) | |||
1549 | static int w9968cf_i2c_detach_inform(struct i2c_client* client) | 1548 | static int w9968cf_i2c_detach_inform(struct i2c_client* client) |
1550 | { | 1549 | { |
1551 | struct w9968cf_device* cam = i2c_get_adapdata(client->adapter); | 1550 | struct w9968cf_device* cam = i2c_get_adapdata(client->adapter); |
1552 | const char* clientname = i2c_clientname(client); | ||
1553 | 1551 | ||
1554 | if (cam->sensor_client == client) | 1552 | if (cam->sensor_client == client) |
1555 | cam->sensor_client = NULL; | 1553 | cam->sensor_client = NULL; |
1556 | 1554 | ||
1557 | DBG(5, "I2C detach client [%s]", clientname) | 1555 | DBG(5, "I2C detach client [%s]", client->name) |
1558 | 1556 | ||
1559 | return 0; | 1557 | return 0; |
1560 | } | 1558 | } |