diff options
Diffstat (limited to 'drivers/media/video/mt9t031.c')
-rw-r--r-- | drivers/media/video/mt9t031.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/video/mt9t031.c b/drivers/media/video/mt9t031.c index a9a28b214235..9bd44a816ea1 100644 --- a/drivers/media/video/mt9t031.c +++ b/drivers/media/video/mt9t031.c | |||
@@ -163,7 +163,7 @@ static int mt9t031_disable(struct i2c_client *client) | |||
163 | 163 | ||
164 | static int mt9t031_s_stream(struct v4l2_subdev *sd, int enable) | 164 | static int mt9t031_s_stream(struct v4l2_subdev *sd, int enable) |
165 | { | 165 | { |
166 | struct i2c_client *client = sd->priv; | 166 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
167 | int ret; | 167 | int ret; |
168 | 168 | ||
169 | if (enable) | 169 | if (enable) |
@@ -393,7 +393,7 @@ static int mt9t031_set_params(struct i2c_client *client, | |||
393 | static int mt9t031_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | 393 | static int mt9t031_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) |
394 | { | 394 | { |
395 | struct v4l2_rect rect = a->c; | 395 | struct v4l2_rect rect = a->c; |
396 | struct i2c_client *client = sd->priv; | 396 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
397 | struct mt9t031 *mt9t031 = to_mt9t031(client); | 397 | struct mt9t031 *mt9t031 = to_mt9t031(client); |
398 | 398 | ||
399 | rect.width = ALIGN(rect.width, 2); | 399 | rect.width = ALIGN(rect.width, 2); |
@@ -410,7 +410,7 @@ static int mt9t031_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | |||
410 | 410 | ||
411 | static int mt9t031_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | 411 | static int mt9t031_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) |
412 | { | 412 | { |
413 | struct i2c_client *client = sd->priv; | 413 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
414 | struct mt9t031 *mt9t031 = to_mt9t031(client); | 414 | struct mt9t031 *mt9t031 = to_mt9t031(client); |
415 | 415 | ||
416 | a->c = mt9t031->rect; | 416 | a->c = mt9t031->rect; |
@@ -436,7 +436,7 @@ static int mt9t031_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) | |||
436 | static int mt9t031_g_fmt(struct v4l2_subdev *sd, | 436 | static int mt9t031_g_fmt(struct v4l2_subdev *sd, |
437 | struct v4l2_mbus_framefmt *mf) | 437 | struct v4l2_mbus_framefmt *mf) |
438 | { | 438 | { |
439 | struct i2c_client *client = sd->priv; | 439 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
440 | struct mt9t031 *mt9t031 = to_mt9t031(client); | 440 | struct mt9t031 *mt9t031 = to_mt9t031(client); |
441 | 441 | ||
442 | mf->width = mt9t031->rect.width / mt9t031->xskip; | 442 | mf->width = mt9t031->rect.width / mt9t031->xskip; |
@@ -451,7 +451,7 @@ static int mt9t031_g_fmt(struct v4l2_subdev *sd, | |||
451 | static int mt9t031_s_fmt(struct v4l2_subdev *sd, | 451 | static int mt9t031_s_fmt(struct v4l2_subdev *sd, |
452 | struct v4l2_mbus_framefmt *mf) | 452 | struct v4l2_mbus_framefmt *mf) |
453 | { | 453 | { |
454 | struct i2c_client *client = sd->priv; | 454 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
455 | struct mt9t031 *mt9t031 = to_mt9t031(client); | 455 | struct mt9t031 *mt9t031 = to_mt9t031(client); |
456 | u16 xskip, yskip; | 456 | u16 xskip, yskip; |
457 | struct v4l2_rect rect = mt9t031->rect; | 457 | struct v4l2_rect rect = mt9t031->rect; |
@@ -490,7 +490,7 @@ static int mt9t031_try_fmt(struct v4l2_subdev *sd, | |||
490 | static int mt9t031_g_chip_ident(struct v4l2_subdev *sd, | 490 | static int mt9t031_g_chip_ident(struct v4l2_subdev *sd, |
491 | struct v4l2_dbg_chip_ident *id) | 491 | struct v4l2_dbg_chip_ident *id) |
492 | { | 492 | { |
493 | struct i2c_client *client = sd->priv; | 493 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
494 | struct mt9t031 *mt9t031 = to_mt9t031(client); | 494 | struct mt9t031 *mt9t031 = to_mt9t031(client); |
495 | 495 | ||
496 | if (id->match.type != V4L2_CHIP_MATCH_I2C_ADDR) | 496 | if (id->match.type != V4L2_CHIP_MATCH_I2C_ADDR) |
@@ -509,7 +509,7 @@ static int mt9t031_g_chip_ident(struct v4l2_subdev *sd, | |||
509 | static int mt9t031_g_register(struct v4l2_subdev *sd, | 509 | static int mt9t031_g_register(struct v4l2_subdev *sd, |
510 | struct v4l2_dbg_register *reg) | 510 | struct v4l2_dbg_register *reg) |
511 | { | 511 | { |
512 | struct i2c_client *client = sd->priv; | 512 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
513 | 513 | ||
514 | if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff) | 514 | if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff) |
515 | return -EINVAL; | 515 | return -EINVAL; |
@@ -528,7 +528,7 @@ static int mt9t031_g_register(struct v4l2_subdev *sd, | |||
528 | static int mt9t031_s_register(struct v4l2_subdev *sd, | 528 | static int mt9t031_s_register(struct v4l2_subdev *sd, |
529 | struct v4l2_dbg_register *reg) | 529 | struct v4l2_dbg_register *reg) |
530 | { | 530 | { |
531 | struct i2c_client *client = sd->priv; | 531 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
532 | 532 | ||
533 | if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff) | 533 | if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff) |
534 | return -EINVAL; | 534 | return -EINVAL; |
@@ -545,7 +545,7 @@ static int mt9t031_s_register(struct v4l2_subdev *sd, | |||
545 | 545 | ||
546 | static int mt9t031_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | 546 | static int mt9t031_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) |
547 | { | 547 | { |
548 | struct i2c_client *client = sd->priv; | 548 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
549 | struct mt9t031 *mt9t031 = to_mt9t031(client); | 549 | struct mt9t031 *mt9t031 = to_mt9t031(client); |
550 | int data; | 550 | int data; |
551 | 551 | ||
@@ -577,7 +577,7 @@ static int mt9t031_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
577 | 577 | ||
578 | static int mt9t031_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | 578 | static int mt9t031_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) |
579 | { | 579 | { |
580 | struct i2c_client *client = sd->priv; | 580 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
581 | struct mt9t031 *mt9t031 = to_mt9t031(client); | 581 | struct mt9t031 *mt9t031 = to_mt9t031(client); |
582 | const struct v4l2_queryctrl *qctrl; | 582 | const struct v4l2_queryctrl *qctrl; |
583 | int data; | 583 | int data; |
@@ -703,7 +703,7 @@ static int mt9t031_runtime_resume(struct device *dev) | |||
703 | struct soc_camera_device *icd = container_of(vdev->parent, | 703 | struct soc_camera_device *icd = container_of(vdev->parent, |
704 | struct soc_camera_device, dev); | 704 | struct soc_camera_device, dev); |
705 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | 705 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
706 | struct i2c_client *client = sd->priv; | 706 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
707 | struct mt9t031 *mt9t031 = to_mt9t031(client); | 707 | struct mt9t031 *mt9t031 = to_mt9t031(client); |
708 | 708 | ||
709 | int ret; | 709 | int ret; |
@@ -780,7 +780,7 @@ static int mt9t031_video_probe(struct i2c_client *client) | |||
780 | 780 | ||
781 | static int mt9t031_g_skip_top_lines(struct v4l2_subdev *sd, u32 *lines) | 781 | static int mt9t031_g_skip_top_lines(struct v4l2_subdev *sd, u32 *lines) |
782 | { | 782 | { |
783 | struct i2c_client *client = sd->priv; | 783 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
784 | struct mt9t031 *mt9t031 = to_mt9t031(client); | 784 | struct mt9t031 *mt9t031 = to_mt9t031(client); |
785 | 785 | ||
786 | *lines = mt9t031->y_skip_top; | 786 | *lines = mt9t031->y_skip_top; |