diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-30 05:55:27 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:49 -0400 |
commit | bccfa449ae5bd4cc5b52160d25fbdb1fe8a27932 (patch) | |
tree | 09ca059a87351bb1e68843557173bb2f13da8505 /drivers/media/video/ks0127.c | |
parent | 41c129a87014bb83efb3e0224bb44cfc54659f8f (diff) |
V4L/DVB (11311): v4l: replace 'ioctl' references in v4l i2c drivers
Replace 'VIDIOC_' references in v4l i2c drivers by their new v4l2_subdev
callback names.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ks0127.c')
-rw-r--r-- | drivers/media/video/ks0127.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/media/video/ks0127.c b/drivers/media/video/ks0127.c index 4b3a116f2f59..841024b6bcdf 100644 --- a/drivers/media/video/ks0127.c +++ b/drivers/media/video/ks0127.c | |||
@@ -421,7 +421,7 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r | |||
421 | case KS_INPUT_COMPOSITE_5: | 421 | case KS_INPUT_COMPOSITE_5: |
422 | case KS_INPUT_COMPOSITE_6: | 422 | case KS_INPUT_COMPOSITE_6: |
423 | v4l2_dbg(1, debug, sd, | 423 | v4l2_dbg(1, debug, sd, |
424 | "VIDIOC_S_INPUT %d: Composite\n", route->input); | 424 | "s_routing %d: Composite\n", route->input); |
425 | /* autodetect 50/60 Hz */ | 425 | /* autodetect 50/60 Hz */ |
426 | ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00); | 426 | ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00); |
427 | /* VSE=0 */ | 427 | /* VSE=0 */ |
@@ -455,7 +455,7 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r | |||
455 | case KS_INPUT_SVIDEO_2: | 455 | case KS_INPUT_SVIDEO_2: |
456 | case KS_INPUT_SVIDEO_3: | 456 | case KS_INPUT_SVIDEO_3: |
457 | v4l2_dbg(1, debug, sd, | 457 | v4l2_dbg(1, debug, sd, |
458 | "VIDIOC_S_INPUT %d: S-Video\n", route->input); | 458 | "s_routing %d: S-Video\n", route->input); |
459 | /* autodetect 50/60 Hz */ | 459 | /* autodetect 50/60 Hz */ |
460 | ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00); | 460 | ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00); |
461 | /* VSE=0 */ | 461 | /* VSE=0 */ |
@@ -486,7 +486,7 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r | |||
486 | break; | 486 | break; |
487 | 487 | ||
488 | case KS_INPUT_YUV656: | 488 | case KS_INPUT_YUV656: |
489 | v4l2_dbg(1, debug, sd, "VIDIOC_S_INPUT 15: YUV656\n"); | 489 | v4l2_dbg(1, debug, sd, "s_routing 15: YUV656\n"); |
490 | if (ks->norm & V4L2_STD_525_60) | 490 | if (ks->norm & V4L2_STD_525_60) |
491 | /* force 60 Hz */ | 491 | /* force 60 Hz */ |
492 | ks0127_and_or(sd, KS_CMDA, 0xfc, 0x03); | 492 | ks0127_and_or(sd, KS_CMDA, 0xfc, 0x03); |
@@ -531,7 +531,7 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r | |||
531 | 531 | ||
532 | default: | 532 | default: |
533 | v4l2_dbg(1, debug, sd, | 533 | v4l2_dbg(1, debug, sd, |
534 | "VIDIOC_INT_S_VIDEO_ROUTING: Unknown input %d\n", route->input); | 534 | "s_routing: Unknown input %d\n", route->input); |
535 | break; | 535 | break; |
536 | } | 536 | } |
537 | 537 | ||
@@ -551,23 +551,23 @@ static int ks0127_s_std(struct v4l2_subdev *sd, v4l2_std_id std) | |||
551 | ks->norm = std; | 551 | ks->norm = std; |
552 | if (std & V4L2_STD_NTSC) { | 552 | if (std & V4L2_STD_NTSC) { |
553 | v4l2_dbg(1, debug, sd, | 553 | v4l2_dbg(1, debug, sd, |
554 | "VIDIOC_S_STD: NTSC_M\n"); | 554 | "s_std: NTSC_M\n"); |
555 | ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x20); | 555 | ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x20); |
556 | } else if (std & V4L2_STD_PAL_N) { | 556 | } else if (std & V4L2_STD_PAL_N) { |
557 | v4l2_dbg(1, debug, sd, | 557 | v4l2_dbg(1, debug, sd, |
558 | "KS0127_SET_NORM: NTSC_N (fixme)\n"); | 558 | "s_std: NTSC_N (fixme)\n"); |
559 | ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x40); | 559 | ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x40); |
560 | } else if (std & V4L2_STD_PAL) { | 560 | } else if (std & V4L2_STD_PAL) { |
561 | v4l2_dbg(1, debug, sd, | 561 | v4l2_dbg(1, debug, sd, |
562 | "VIDIOC_S_STD: PAL_N\n"); | 562 | "s_std: PAL_N\n"); |
563 | ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x20); | 563 | ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x20); |
564 | } else if (std & V4L2_STD_PAL_M) { | 564 | } else if (std & V4L2_STD_PAL_M) { |
565 | v4l2_dbg(1, debug, sd, | 565 | v4l2_dbg(1, debug, sd, |
566 | "KS0127_SET_NORM: PAL_M (fixme)\n"); | 566 | "s_std: PAL_M (fixme)\n"); |
567 | ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x40); | 567 | ks0127_and_or(sd, KS_CHROMA, 0x9f, 0x40); |
568 | } else if (std & V4L2_STD_SECAM) { | 568 | } else if (std & V4L2_STD_SECAM) { |
569 | v4l2_dbg(1, debug, sd, | 569 | v4l2_dbg(1, debug, sd, |
570 | "KS0127_SET_NORM: SECAM\n"); | 570 | "s_std: SECAM\n"); |
571 | 571 | ||
572 | /* set to secam autodetection */ | 572 | /* set to secam autodetection */ |
573 | ks0127_and_or(sd, KS_CHROMA, 0xdf, 0x20); | 573 | ks0127_and_or(sd, KS_CHROMA, 0xdf, 0x20); |
@@ -579,7 +579,7 @@ static int ks0127_s_std(struct v4l2_subdev *sd, v4l2_std_id std) | |||
579 | /* force to secam mode */ | 579 | /* force to secam mode */ |
580 | ks0127_and_or(sd, KS_DEMOD, 0xf0, 0x0f); | 580 | ks0127_and_or(sd, KS_DEMOD, 0xf0, 0x0f); |
581 | } else { | 581 | } else { |
582 | v4l2_dbg(1, debug, sd, "VIDIOC_S_STD: Unknown norm %llx\n", | 582 | v4l2_dbg(1, debug, sd, "s_std: Unknown norm %llx\n", |
583 | (unsigned long long)std); | 583 | (unsigned long long)std); |
584 | } | 584 | } |
585 | return 0; | 585 | return 0; |
@@ -608,7 +608,6 @@ static int ks0127_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pstd | |||
608 | u8 status; | 608 | u8 status; |
609 | v4l2_std_id std = V4L2_STD_ALL; | 609 | v4l2_std_id std = V4L2_STD_ALL; |
610 | 610 | ||
611 | v4l2_dbg(1, debug, sd, "VIDIOC_QUERYSTD/VIDIOC_INT_G_INPUT_STATUS\n"); | ||
612 | status = ks0127_read(sd, KS_STAT); | 611 | status = ks0127_read(sd, KS_STAT); |
613 | if (!(status & 0x20)) /* NOVID not set */ | 612 | if (!(status & 0x20)) /* NOVID not set */ |
614 | stat = 0; | 613 | stat = 0; |
@@ -627,11 +626,13 @@ static int ks0127_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pstd | |||
627 | 626 | ||
628 | static int ks0127_querystd(struct v4l2_subdev *sd, v4l2_std_id *std) | 627 | static int ks0127_querystd(struct v4l2_subdev *sd, v4l2_std_id *std) |
629 | { | 628 | { |
629 | v4l2_dbg(1, debug, sd, "querystd\n"); | ||
630 | return ks0127_status(sd, NULL, std); | 630 | return ks0127_status(sd, NULL, std); |
631 | } | 631 | } |
632 | 632 | ||
633 | static int ks0127_g_input_status(struct v4l2_subdev *sd, u32 *status) | 633 | static int ks0127_g_input_status(struct v4l2_subdev *sd, u32 *status) |
634 | { | 634 | { |
635 | v4l2_dbg(1, debug, sd, "g_input_status\n"); | ||
635 | return ks0127_status(sd, status, NULL); | 636 | return ks0127_status(sd, status, NULL); |
636 | } | 637 | } |
637 | 638 | ||