Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 241854
b: refs/heads/master
c: a34ec5f
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Mar 21, 2011
1 parent 3abc11a commit abc56c9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 38 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 900f734b3bafb4e111b9ec5d865c448a9911b2ab
refs/heads/master: a34ec5f3743950cadb8f512c884b8c9dbaa9a7a5
47 changes: 10 additions & 37 deletions trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,17 @@ static void set_type(struct i2c_client *c, unsigned int type,
* it's applied. Otherwise status and type are applied only to
* tuner with exactly the same addr.
*/

static void set_addr(struct i2c_client *c, struct tuner_setup *tun_setup)
static int tuner_s_type_addr(struct v4l2_subdev *sd,
struct tuner_setup *tun_setup)
{
struct tuner *t = to_tuner(i2c_get_clientdata(c));
struct tuner *t = to_tuner(sd);
struct i2c_client *c = v4l2_get_subdevdata(sd);

tuner_dbg("Calling set_type_addr for type=%d, addr=0x%02x, mode=0x%02x, config=0x%02x\n",
tun_setup->type,
tun_setup->addr,
tun_setup->mode_mask,
tun_setup->config);

if ((t->type == UNSET && ((tun_setup->addr == ADDR_UNSET) &&
(t->mode_mask & tun_setup->mode_mask))) ||
Expand All @@ -434,20 +441,7 @@ static void set_addr(struct i2c_client *c, struct tuner_setup *tun_setup)
"Asked to change tuner at addr 0x%02x, with mask %x\n",
t->type, t->mode_mask,
tun_setup->addr, tun_setup->mode_mask);
}

static int tuner_s_type_addr(struct v4l2_subdev *sd, struct tuner_setup *type)
{
struct tuner *t = to_tuner(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);

tuner_dbg("Calling set_type_addr for type=%d, addr=0x%02x, mode=0x%02x, config=0x%02x\n",
type->type,
type->addr,
type->mode_mask,
type->config);

set_addr(client, type);
return 0;
}

Expand Down Expand Up @@ -900,27 +894,6 @@ static int set_mode_freq(struct i2c_client *client, struct tuner *t,
return 0;
}

/*
* Functions that should be broken into separate radio/TV functions
*/

static void set_freq(struct i2c_client *c, unsigned long freq)
{
struct tuner *t = to_tuner(i2c_get_clientdata(c));

switch (t->mode) {
case V4L2_TUNER_RADIO:
set_radio_freq(c, freq);
break;
case V4L2_TUNER_ANALOG_TV:
case V4L2_TUNER_DIGITAL_TV:
set_tv_freq(c, freq);
break;
default:
tuner_dbg("freq set: unknown mode: 0x%04x!\n", t->mode);
}
}

/**
* tuner_status - Dumps the current tuner status at dmesg
* @fe: pointer to struct dvb_frontend
Expand Down

0 comments on commit abc56c9

Please sign in to comment.