aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-i2c.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-i2c.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c
index ca1d9557945e..e73a196ecc7a 100644
--- a/drivers/media/video/ivtv/ivtv-i2c.c
+++ b/drivers/media/video/ivtv/ivtv-i2c.c
@@ -194,14 +194,14 @@ struct v4l2_subdev *ivtv_find_hw(struct ivtv *itv, u32 hw)
194 struct v4l2_subdev *result = NULL; 194 struct v4l2_subdev *result = NULL;
195 struct v4l2_subdev *sd; 195 struct v4l2_subdev *sd;
196 196
197 spin_lock(&itv->device.lock); 197 spin_lock(&itv->v4l2_dev.lock);
198 v4l2_device_for_each_subdev(sd, &itv->device) { 198 v4l2_device_for_each_subdev(sd, &itv->v4l2_dev) {
199 if (sd->grp_id == hw) { 199 if (sd->grp_id == hw) {
200 result = sd; 200 result = sd;
201 break; 201 break;
202 } 202 }
203 } 203 }
204 spin_unlock(&itv->device.lock); 204 spin_unlock(&itv->v4l2_dev.lock);
205 return result; 205 return result;
206} 206}
207 207
@@ -472,8 +472,8 @@ static int ivtv_read(struct ivtv *itv, unsigned char addr, unsigned char *data,
472 intervening stop condition */ 472 intervening stop condition */
473static int ivtv_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) 473static int ivtv_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
474{ 474{
475 struct v4l2_device *drv = i2c_get_adapdata(i2c_adap); 475 struct v4l2_device *v4l2_dev = i2c_get_adapdata(i2c_adap);
476 struct ivtv *itv = to_ivtv(drv); 476 struct ivtv *itv = to_ivtv(v4l2_dev);
477 int retval; 477 int retval;
478 int i; 478 int i;
479 479
@@ -604,12 +604,12 @@ int init_ivtv_i2c(struct ivtv *itv)
604 604
605 sprintf(itv->i2c_adap.name + strlen(itv->i2c_adap.name), " #%d", 605 sprintf(itv->i2c_adap.name + strlen(itv->i2c_adap.name), " #%d",
606 itv->instance); 606 itv->instance);
607 i2c_set_adapdata(&itv->i2c_adap, &itv->device); 607 i2c_set_adapdata(&itv->i2c_adap, &itv->v4l2_dev);
608 608
609 memcpy(&itv->i2c_client, &ivtv_i2c_client_template, 609 memcpy(&itv->i2c_client, &ivtv_i2c_client_template,
610 sizeof(struct i2c_client)); 610 sizeof(struct i2c_client));
611 itv->i2c_client.adapter = &itv->i2c_adap; 611 itv->i2c_client.adapter = &itv->i2c_adap;
612 itv->i2c_adap.dev.parent = &itv->dev->dev; 612 itv->i2c_adap.dev.parent = &itv->pdev->dev;
613 613
614 IVTV_DEBUG_I2C("setting scl and sda to 1\n"); 614 IVTV_DEBUG_I2C("setting scl and sda to 1\n");
615 ivtv_setscl(itv, 1); 615 ivtv_setscl(itv, 1);