aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ks0127.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-04-02 10:26:22 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:44:27 -0400
commit5325b4272a53b43f55b82cc369c310c2fcacdca1 (patch)
treef2a1491de3d05901152e0e271c0cb5ce381884c2 /drivers/media/video/ks0127.c
parentc0ff29150d37615ac703802ab3edc775fd402491 (diff)
V4L/DVB (11380): v4l2-subdev: change s_routing prototype
It is no longer needed to use a struct pointer as argument, since v4l2_subdev doesn't require that ioctl-like approach anymore. Instead just pass the input, output and config (new!) arguments directly. 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.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/media/video/ks0127.c b/drivers/media/video/ks0127.c
index 4e5f0e7dc591..fab8e0254bbc 100644
--- a/drivers/media/video/ks0127.c
+++ b/drivers/media/video/ks0127.c
@@ -409,11 +409,12 @@ static void ks0127_init(struct v4l2_subdev *sd)
409 } 409 }
410} 410}
411 411
412static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route) 412static int ks0127_s_routing(struct v4l2_subdev *sd,
413 u32 input, u32 output, u32 config)
413{ 414{
414 struct ks0127 *ks = to_ks0127(sd); 415 struct ks0127 *ks = to_ks0127(sd);
415 416
416 switch (route->input) { 417 switch (input) {
417 case KS_INPUT_COMPOSITE_1: 418 case KS_INPUT_COMPOSITE_1:
418 case KS_INPUT_COMPOSITE_2: 419 case KS_INPUT_COMPOSITE_2:
419 case KS_INPUT_COMPOSITE_3: 420 case KS_INPUT_COMPOSITE_3:
@@ -421,13 +422,13 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
421 case KS_INPUT_COMPOSITE_5: 422 case KS_INPUT_COMPOSITE_5:
422 case KS_INPUT_COMPOSITE_6: 423 case KS_INPUT_COMPOSITE_6:
423 v4l2_dbg(1, debug, sd, 424 v4l2_dbg(1, debug, sd,
424 "s_routing %d: Composite\n", route->input); 425 "s_routing %d: Composite\n", input);
425 /* autodetect 50/60 Hz */ 426 /* autodetect 50/60 Hz */
426 ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00); 427 ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00);
427 /* VSE=0 */ 428 /* VSE=0 */
428 ks0127_and_or(sd, KS_CMDA, ~0x40, 0x00); 429 ks0127_and_or(sd, KS_CMDA, ~0x40, 0x00);
429 /* set input line */ 430 /* set input line */
430 ks0127_and_or(sd, KS_CMDB, 0xb0, route->input); 431 ks0127_and_or(sd, KS_CMDB, 0xb0, input);
431 /* non-freerunning mode */ 432 /* non-freerunning mode */
432 ks0127_and_or(sd, KS_CMDC, 0x70, 0x0a); 433 ks0127_and_or(sd, KS_CMDC, 0x70, 0x0a);
433 /* analog input */ 434 /* analog input */
@@ -455,13 +456,13 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
455 case KS_INPUT_SVIDEO_2: 456 case KS_INPUT_SVIDEO_2:
456 case KS_INPUT_SVIDEO_3: 457 case KS_INPUT_SVIDEO_3:
457 v4l2_dbg(1, debug, sd, 458 v4l2_dbg(1, debug, sd,
458 "s_routing %d: S-Video\n", route->input); 459 "s_routing %d: S-Video\n", input);
459 /* autodetect 50/60 Hz */ 460 /* autodetect 50/60 Hz */
460 ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00); 461 ks0127_and_or(sd, KS_CMDA, 0xfc, 0x00);
461 /* VSE=0 */ 462 /* VSE=0 */
462 ks0127_and_or(sd, KS_CMDA, ~0x40, 0x00); 463 ks0127_and_or(sd, KS_CMDA, ~0x40, 0x00);
463 /* set input line */ 464 /* set input line */
464 ks0127_and_or(sd, KS_CMDB, 0xb0, route->input); 465 ks0127_and_or(sd, KS_CMDB, 0xb0, input);
465 /* non-freerunning mode */ 466 /* non-freerunning mode */
466 ks0127_and_or(sd, KS_CMDC, 0x70, 0x0a); 467 ks0127_and_or(sd, KS_CMDC, 0x70, 0x0a);
467 /* analog input */ 468 /* analog input */
@@ -496,7 +497,7 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
496 497
497 ks0127_and_or(sd, KS_CMDA, 0xff, 0x40); /* VSE=1 */ 498 ks0127_and_or(sd, KS_CMDA, 0xff, 0x40); /* VSE=1 */
498 /* set input line and VALIGN */ 499 /* set input line and VALIGN */
499 ks0127_and_or(sd, KS_CMDB, 0xb0, (route->input | 0x40)); 500 ks0127_and_or(sd, KS_CMDB, 0xb0, (input | 0x40));
500 /* freerunning mode, */ 501 /* freerunning mode, */
501 /* TSTGEN = 1 TSTGFR=11 TSTGPH=0 TSTGPK=0 VMEM=1*/ 502 /* TSTGEN = 1 TSTGFR=11 TSTGPH=0 TSTGPK=0 VMEM=1*/
502 ks0127_and_or(sd, KS_CMDC, 0x70, 0x87); 503 ks0127_and_or(sd, KS_CMDC, 0x70, 0x87);
@@ -531,7 +532,7 @@ static int ks0127_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *r
531 532
532 default: 533 default:
533 v4l2_dbg(1, debug, sd, 534 v4l2_dbg(1, debug, sd,
534 "s_routing: Unknown input %d\n", route->input); 535 "s_routing: Unknown input %d\n", input);
535 break; 536 break;
536 } 537 }
537 538