aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx25821/cx25821-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx25821/cx25821-i2c.c')
-rw-r--r--drivers/media/video/cx25821/cx25821-i2c.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/cx25821/cx25821-i2c.c b/drivers/media/video/cx25821/cx25821-i2c.c
index 4d3d0ce4078..12d7300fa1e 100644
--- a/drivers/media/video/cx25821/cx25821-i2c.c
+++ b/drivers/media/video/cx25821/cx25821-i2c.c
@@ -252,8 +252,8 @@ static int i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
252 } else if (i + 1 < num && (msgs[i + 1].flags & I2C_M_RD) && 252 } else if (i + 1 < num && (msgs[i + 1].flags & I2C_M_RD) &&
253 msgs[i].addr == msgs[i + 1].addr) { 253 msgs[i].addr == msgs[i + 1].addr) {
254 /* write then read from same address */ 254 /* write then read from same address */
255 retval = 255 retval = i2c_sendbytes(i2c_adap, &msgs[i],
256 i2c_sendbytes(i2c_adap, &msgs[i], msgs[i + 1].len); 256 msgs[i + 1].len);
257 257
258 if (retval < 0) 258 if (retval < 0)
259 goto err; 259 goto err;
@@ -276,10 +276,8 @@ err:
276 276
277static u32 cx25821_functionality(struct i2c_adapter *adap) 277static u32 cx25821_functionality(struct i2c_adapter *adap)
278{ 278{
279 return I2C_FUNC_SMBUS_EMUL | 279 return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C | I2C_FUNC_SMBUS_WORD_DATA |
280 I2C_FUNC_I2C | 280 I2C_FUNC_SMBUS_READ_WORD_DATA | I2C_FUNC_SMBUS_WRITE_WORD_DATA;
281 I2C_FUNC_SMBUS_WORD_DATA |
282 I2C_FUNC_SMBUS_READ_WORD_DATA | I2C_FUNC_SMBUS_WRITE_WORD_DATA;
283} 281}
284 282
285static struct i2c_algorithm cx25821_i2c_algo_template = { 283static struct i2c_algorithm cx25821_i2c_algo_template = {
@@ -300,7 +298,7 @@ static struct i2c_client cx25821_i2c_client_template = {
300 .name = "cx25821 internal", 298 .name = "cx25821 internal",
301}; 299};
302 300
303/* init + register i2c algo-bit adapter */ 301/* init + register i2c adapter */
304int cx25821_i2c_register(struct cx25821_i2c *bus) 302int cx25821_i2c_register(struct cx25821_i2c *bus)
305{ 303{
306 struct cx25821_dev *dev = bus->dev; 304 struct cx25821_dev *dev = bus->dev;