diff options
Diffstat (limited to 'drivers/media/video/mt9v022.c')
-rw-r--r-- | drivers/media/video/mt9v022.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index b48473c7896b..b96171cc79f9 100644 --- a/drivers/media/video/mt9v022.c +++ b/drivers/media/video/mt9v022.c | |||
@@ -184,7 +184,7 @@ static int mt9v022_init(struct i2c_client *client) | |||
184 | 184 | ||
185 | static int mt9v022_s_stream(struct v4l2_subdev *sd, int enable) | 185 | static int mt9v022_s_stream(struct v4l2_subdev *sd, int enable) |
186 | { | 186 | { |
187 | struct i2c_client *client = sd->priv; | 187 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
188 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 188 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
189 | 189 | ||
190 | if (enable) | 190 | if (enable) |
@@ -273,7 +273,7 @@ static unsigned long mt9v022_query_bus_param(struct soc_camera_device *icd) | |||
273 | 273 | ||
274 | static int mt9v022_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | 274 | static int mt9v022_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) |
275 | { | 275 | { |
276 | struct i2c_client *client = sd->priv; | 276 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
277 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 277 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
278 | struct v4l2_rect rect = a->c; | 278 | struct v4l2_rect rect = a->c; |
279 | int ret; | 279 | int ret; |
@@ -334,7 +334,7 @@ static int mt9v022_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | |||
334 | 334 | ||
335 | static int mt9v022_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | 335 | static int mt9v022_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) |
336 | { | 336 | { |
337 | struct i2c_client *client = sd->priv; | 337 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
338 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 338 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
339 | 339 | ||
340 | a->c = mt9v022->rect; | 340 | a->c = mt9v022->rect; |
@@ -360,7 +360,7 @@ static int mt9v022_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) | |||
360 | static int mt9v022_g_fmt(struct v4l2_subdev *sd, | 360 | static int mt9v022_g_fmt(struct v4l2_subdev *sd, |
361 | struct v4l2_mbus_framefmt *mf) | 361 | struct v4l2_mbus_framefmt *mf) |
362 | { | 362 | { |
363 | struct i2c_client *client = sd->priv; | 363 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
364 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 364 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
365 | 365 | ||
366 | mf->width = mt9v022->rect.width; | 366 | mf->width = mt9v022->rect.width; |
@@ -375,7 +375,7 @@ static int mt9v022_g_fmt(struct v4l2_subdev *sd, | |||
375 | static int mt9v022_s_fmt(struct v4l2_subdev *sd, | 375 | static int mt9v022_s_fmt(struct v4l2_subdev *sd, |
376 | struct v4l2_mbus_framefmt *mf) | 376 | struct v4l2_mbus_framefmt *mf) |
377 | { | 377 | { |
378 | struct i2c_client *client = sd->priv; | 378 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
379 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 379 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
380 | struct v4l2_crop a = { | 380 | struct v4l2_crop a = { |
381 | .c = { | 381 | .c = { |
@@ -422,7 +422,7 @@ static int mt9v022_s_fmt(struct v4l2_subdev *sd, | |||
422 | static int mt9v022_try_fmt(struct v4l2_subdev *sd, | 422 | static int mt9v022_try_fmt(struct v4l2_subdev *sd, |
423 | struct v4l2_mbus_framefmt *mf) | 423 | struct v4l2_mbus_framefmt *mf) |
424 | { | 424 | { |
425 | struct i2c_client *client = sd->priv; | 425 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
426 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 426 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
427 | const struct mt9v022_datafmt *fmt; | 427 | const struct mt9v022_datafmt *fmt; |
428 | int align = mf->code == V4L2_MBUS_FMT_SBGGR8_1X8 || | 428 | int align = mf->code == V4L2_MBUS_FMT_SBGGR8_1X8 || |
@@ -448,7 +448,7 @@ static int mt9v022_try_fmt(struct v4l2_subdev *sd, | |||
448 | static int mt9v022_g_chip_ident(struct v4l2_subdev *sd, | 448 | static int mt9v022_g_chip_ident(struct v4l2_subdev *sd, |
449 | struct v4l2_dbg_chip_ident *id) | 449 | struct v4l2_dbg_chip_ident *id) |
450 | { | 450 | { |
451 | struct i2c_client *client = sd->priv; | 451 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
452 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 452 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
453 | 453 | ||
454 | if (id->match.type != V4L2_CHIP_MATCH_I2C_ADDR) | 454 | if (id->match.type != V4L2_CHIP_MATCH_I2C_ADDR) |
@@ -467,7 +467,7 @@ static int mt9v022_g_chip_ident(struct v4l2_subdev *sd, | |||
467 | static int mt9v022_g_register(struct v4l2_subdev *sd, | 467 | static int mt9v022_g_register(struct v4l2_subdev *sd, |
468 | struct v4l2_dbg_register *reg) | 468 | struct v4l2_dbg_register *reg) |
469 | { | 469 | { |
470 | struct i2c_client *client = sd->priv; | 470 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
471 | 471 | ||
472 | if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff) | 472 | if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff) |
473 | return -EINVAL; | 473 | return -EINVAL; |
@@ -487,7 +487,7 @@ static int mt9v022_g_register(struct v4l2_subdev *sd, | |||
487 | static int mt9v022_s_register(struct v4l2_subdev *sd, | 487 | static int mt9v022_s_register(struct v4l2_subdev *sd, |
488 | struct v4l2_dbg_register *reg) | 488 | struct v4l2_dbg_register *reg) |
489 | { | 489 | { |
490 | struct i2c_client *client = sd->priv; | 490 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
491 | 491 | ||
492 | if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff) | 492 | if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff) |
493 | return -EINVAL; | 493 | return -EINVAL; |
@@ -565,7 +565,7 @@ static struct soc_camera_ops mt9v022_ops = { | |||
565 | 565 | ||
566 | static int mt9v022_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | 566 | static int mt9v022_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) |
567 | { | 567 | { |
568 | struct i2c_client *client = sd->priv; | 568 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
569 | const struct v4l2_queryctrl *qctrl; | 569 | const struct v4l2_queryctrl *qctrl; |
570 | unsigned long range; | 570 | unsigned long range; |
571 | int data; | 571 | int data; |
@@ -622,7 +622,7 @@ static int mt9v022_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
622 | static int mt9v022_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | 622 | static int mt9v022_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) |
623 | { | 623 | { |
624 | int data; | 624 | int data; |
625 | struct i2c_client *client = sd->priv; | 625 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
626 | const struct v4l2_queryctrl *qctrl; | 626 | const struct v4l2_queryctrl *qctrl; |
627 | 627 | ||
628 | qctrl = soc_camera_find_qctrl(&mt9v022_ops, ctrl->id); | 628 | qctrl = soc_camera_find_qctrl(&mt9v022_ops, ctrl->id); |
@@ -817,7 +817,7 @@ static void mt9v022_video_remove(struct soc_camera_device *icd) | |||
817 | 817 | ||
818 | static int mt9v022_g_skip_top_lines(struct v4l2_subdev *sd, u32 *lines) | 818 | static int mt9v022_g_skip_top_lines(struct v4l2_subdev *sd, u32 *lines) |
819 | { | 819 | { |
820 | struct i2c_client *client = sd->priv; | 820 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
821 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 821 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
822 | 822 | ||
823 | *lines = mt9v022->y_skip_top; | 823 | *lines = mt9v022->y_skip_top; |
@@ -838,7 +838,7 @@ static struct v4l2_subdev_core_ops mt9v022_subdev_core_ops = { | |||
838 | static int mt9v022_enum_fmt(struct v4l2_subdev *sd, unsigned int index, | 838 | static int mt9v022_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
839 | enum v4l2_mbus_pixelcode *code) | 839 | enum v4l2_mbus_pixelcode *code) |
840 | { | 840 | { |
841 | struct i2c_client *client = sd->priv; | 841 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
842 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 842 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
843 | 843 | ||
844 | if (index >= mt9v022->num_fmts) | 844 | if (index >= mt9v022->num_fmts) |