diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 12:35:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 12:35:11 -0400 |
commit | 0851668fdd97e526b2a41f794b785c204dd3d3e0 (patch) | |
tree | 4ef7c20a8be8393006c6fe9627eb29dd30877d61 /drivers/media/video/mt9t031.c | |
parent | 00ebb6382b8d9c7c15b5f8ad230670d8161d38dd (diff) | |
parent | 7655e594945289b418af39f6669fea4666a7b520 (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits)
[media] af9015: Fix max I2C message size when used with tda18271
[media] IR: initialize ir_raw_event in few more drivers
[media] Guard a divide in v4l1 compat layer
[media] imon: fix nomouse modprobe option
[media] imon: remove redundant change_protocol call
[media] imon: fix my egregious brown paper bag w/rdev/idev split
[media] cafe_ccic: Configure ov7670 correctly
[media] ov7670: allow configuration of image size, clock speed, and I/O method
[media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016]
[media] af9015: map DigitalNow TinyTwin v2 remote
[media] DigitalNow TinyTwin remote controller
[media] af9015: RC fixes and improvements
videodev2.h.xml: Update to reflect the latest changes at videodev2.h
[media] v4l: document new Bayer and monochrome pixel formats
[media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028
[media] firedtv: add parameter to fake ca_system_ids in CA_INFO
[media] tm6000: fix a macro coding style issue
tm6000: Remove some ugly debug code
[media] Nova-S-Plus audio line input
[media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers
...
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; |