diff options
Diffstat (limited to 'drivers/usb/media/w9968cf.c')
-rw-r--r-- | drivers/usb/media/w9968cf.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/media/w9968cf.c b/drivers/usb/media/w9968cf.c index ca9f3a30634f..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 | } |
@@ -1573,15 +1571,13 @@ static int w9968cf_i2c_init(struct w9968cf_device* cam) | |||
1573 | int err = 0; | 1571 | int err = 0; |
1574 | 1572 | ||
1575 | static struct i2c_algorithm algo = { | 1573 | static struct i2c_algorithm algo = { |
1576 | .name = "W996[87]CF algorithm", | ||
1577 | .id = I2C_ALGO_SMBUS, | ||
1578 | .smbus_xfer = w9968cf_i2c_smbus_xfer, | 1574 | .smbus_xfer = w9968cf_i2c_smbus_xfer, |
1579 | .algo_control = w9968cf_i2c_control, | 1575 | .algo_control = w9968cf_i2c_control, |
1580 | .functionality = w9968cf_i2c_func, | 1576 | .functionality = w9968cf_i2c_func, |
1581 | }; | 1577 | }; |
1582 | 1578 | ||
1583 | static struct i2c_adapter adap = { | 1579 | static struct i2c_adapter adap = { |
1584 | .id = I2C_ALGO_SMBUS | I2C_HW_SMBUS_W9968CF, | 1580 | .id = I2C_HW_SMBUS_W9968CF, |
1585 | .class = I2C_CLASS_CAM_DIGITAL, | 1581 | .class = I2C_CLASS_CAM_DIGITAL, |
1586 | .owner = THIS_MODULE, | 1582 | .owner = THIS_MODULE, |
1587 | .client_register = w9968cf_i2c_attach_inform, | 1583 | .client_register = w9968cf_i2c_attach_inform, |