aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/msp3400-driver.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/msp3400-driver.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/msp3400-driver.c')
-rw-r--r--drivers/media/video/msp3400-driver.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c
index 38e639750a48..e9df3cb02cc1 100644
--- a/drivers/media/video/msp3400-driver.c
+++ b/drivers/media/video/msp3400-driver.c
@@ -505,25 +505,26 @@ static int msp_s_std(struct v4l2_subdev *sd, v4l2_std_id id)
505 return 0; 505 return 0;
506} 506}
507 507
508static int msp_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *rt) 508static int msp_s_routing(struct v4l2_subdev *sd,
509 u32 input, u32 output, u32 config)
509{ 510{
510 struct msp_state *state = to_state(sd); 511 struct msp_state *state = to_state(sd);
511 struct i2c_client *client = v4l2_get_subdevdata(sd); 512 struct i2c_client *client = v4l2_get_subdevdata(sd);
512 int tuner = (rt->input >> 3) & 1; 513 int tuner = (input >> 3) & 1;
513 int sc_in = rt->input & 0x7; 514 int sc_in = input & 0x7;
514 int sc1_out = rt->output & 0xf; 515 int sc1_out = output & 0xf;
515 int sc2_out = (rt->output >> 4) & 0xf; 516 int sc2_out = (output >> 4) & 0xf;
516 u16 val, reg; 517 u16 val, reg;
517 int i; 518 int i;
518 int extern_input = 1; 519 int extern_input = 1;
519 520
520 if (state->routing.input == rt->input && 521 if (state->route_in == input && state->route_out == output)
521 state->routing.output == rt->output)
522 return 0; 522 return 0;
523 state->routing = *rt; 523 state->route_in = input;
524 state->route_out = output;
524 /* check if the tuner input is used */ 525 /* check if the tuner input is used */
525 for (i = 0; i < 5; i++) { 526 for (i = 0; i < 5; i++) {
526 if (((rt->input >> (4 + i * 4)) & 0xf) == 0) 527 if (((input >> (4 + i * 4)) & 0xf) == 0)
527 extern_input = 0; 528 extern_input = 0;
528 } 529 }
529 state->mode = extern_input ? MSP_MODE_EXTERN : MSP_MODE_AM_DETECT; 530 state->mode = extern_input ? MSP_MODE_EXTERN : MSP_MODE_AM_DETECT;
@@ -673,7 +674,7 @@ static int msp_log_status(struct v4l2_subdev *sd)
673 } 674 }
674 v4l_info(client, "Audmode: 0x%04x\n", state->audmode); 675 v4l_info(client, "Audmode: 0x%04x\n", state->audmode);
675 v4l_info(client, "Routing: 0x%08x (input) 0x%08x (output)\n", 676 v4l_info(client, "Routing: 0x%08x (input) 0x%08x (output)\n",
676 state->routing.input, state->routing.output); 677 state->route_in, state->route_out);
677 v4l_info(client, "ACB: 0x%04x\n", state->acb); 678 v4l_info(client, "ACB: 0x%04x\n", state->acb);
678 return 0; 679 return 0;
679} 680}
@@ -761,8 +762,8 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id)
761 state->i2s_mode = 0; 762 state->i2s_mode = 0;
762 init_waitqueue_head(&state->wq); 763 init_waitqueue_head(&state->wq);
763 /* These are the reset input/output positions */ 764 /* These are the reset input/output positions */
764 state->routing.input = MSP_INPUT_DEFAULT; 765 state->route_in = MSP_INPUT_DEFAULT;
765 state->routing.output = MSP_OUTPUT_DEFAULT; 766 state->route_out = MSP_OUTPUT_DEFAULT;
766 767
767 state->rev1 = msp_read_dsp(client, 0x1e); 768 state->rev1 = msp_read_dsp(client, 0x1e);
768 if (state->rev1 != -1) 769 if (state->rev1 != -1)