Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119026
b: refs/heads/master
c: 81cb5c4
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Nov 14, 2008
1 parent d884323 commit 5ce5d5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: b4ab114cf750a49d91fc292439f8ef69a35a0fab
refs/heads/master: 81cb5c4f7fbe6971d9c61401bc47193290fd59b7
17 changes: 9 additions & 8 deletions trunk/drivers/media/video/tvaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ static struct CHIPDESC chiplist[];
struct CHIPSTATE {
struct i2c_client *c;

/* index into CHIPDESC array */
int type;
/* chip-specific description - should point to
an entry at CHIPDESC table */
struct CHIPDESC *desc;

/* shadow register set */
audiocmd shadow;
Expand Down Expand Up @@ -264,7 +265,7 @@ static void chip_thread_wake(unsigned long data)
static int chip_thread(void *data)
{
struct CHIPSTATE *chip = data;
struct CHIPDESC *desc = chiplist + chip->type;
struct CHIPDESC *desc = chip->desc;
int mode;

v4l_dbg(1, debug, chip->c, "%s: thread started\n", chip->c->name);
Expand Down Expand Up @@ -1087,7 +1088,7 @@ static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; }

static int tda8425_initialize(struct CHIPSTATE *chip)
{
struct CHIPDESC *desc = chiplist + chip->type;
struct CHIPDESC *desc = chip->desc;
int inputmap[4] = { /* tuner */ TDA8425_S1_CH2, /* radio */ TDA8425_S1_CH1,
/* extern */ TDA8425_S1_CH1, /* intern */ TDA8425_S1_OFF};

Expand Down Expand Up @@ -1503,7 +1504,7 @@ static int chip_probe(struct i2c_client *client, const struct i2c_device_id *id)
/* fill required data structures */
if (!id)
strlcpy(client->name, desc->name, I2C_NAME_SIZE);
chip->type = desc-chiplist;
chip->desc = desc;
chip->shadow.count = desc->registers+1;
chip->prevmode = -1;
chip->audmode = V4L2_TUNER_MODE_LANG1;
Expand Down Expand Up @@ -1590,7 +1591,7 @@ static int chip_remove(struct i2c_client *client)
static int tvaudio_get_ctrl(struct CHIPSTATE *chip,
struct v4l2_control *ctrl)
{
struct CHIPDESC *desc = chiplist + chip->type;
struct CHIPDESC *desc = chip->desc;

switch (ctrl->id) {
case V4L2_CID_AUDIO_MUTE:
Expand Down Expand Up @@ -1630,7 +1631,7 @@ static int tvaudio_get_ctrl(struct CHIPSTATE *chip,
static int tvaudio_set_ctrl(struct CHIPSTATE *chip,
struct v4l2_control *ctrl)
{
struct CHIPDESC *desc = chiplist + chip->type;
struct CHIPDESC *desc = chip->desc;

switch (ctrl->id) {
case V4L2_CID_AUDIO_MUTE:
Expand Down Expand Up @@ -1706,7 +1707,7 @@ static int chip_command(struct i2c_client *client,
unsigned int cmd, void *arg)
{
struct CHIPSTATE *chip = i2c_get_clientdata(client);
struct CHIPDESC *desc = chiplist + chip->type;
struct CHIPDESC *desc = chip->desc;

v4l_dbg(1, debug, chip->c, "%s: chip_command 0x%x\n", chip->c->name, cmd);

Expand Down

0 comments on commit 5ce5d5a

Please sign in to comment.