Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92521
b: refs/heads/master
c: 0be51b4
h: refs/heads/master
i:
  92519: e555db5
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 4bb6901 commit f62211e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 27 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: 0fea03fbd3aeaa9b4a4de8409e5ef3aca43a6d0b
refs/heads/master: 0be51b4671b3ae3ae544a0bb3d15b55478b55e72
55 changes: 29 additions & 26 deletions trunk/drivers/media/video/cx88/cx88-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -2090,11 +2090,9 @@ static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)

/* ------------------------------------------------------------------- */
/* some Divco specific stuff */
static int cx88_dvico_xc2028_callback(void *priv, int command, int arg)
static int cx88_dvico_xc2028_callback(struct cx88_core *core,
int command, int arg)
{
struct i2c_algo_bit_data *i2c_algo = priv;
struct cx88_core *core = i2c_algo->data;

switch (command) {
case XC2028_TUNER_RESET:
cx_write(MO_GP0_IO, 0x101000);
Expand All @@ -2112,11 +2110,9 @@ static int cx88_dvico_xc2028_callback(void *priv, int command, int arg)
/* ----------------------------------------------------------------------- */
/* some Geniatech specific stuff */

static int cx88_xc3028_geniatech_tuner_callback(void *priv, int command, int mode)
static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
int command, int mode)
{
struct i2c_algo_bit_data *i2c_algo = priv;
struct cx88_core *core = i2c_algo->data;

switch (command) {
case XC2028_TUNER_RESET:
switch (INPUT(core->input).type) {
Expand All @@ -2143,11 +2139,9 @@ static int cx88_xc3028_geniatech_tuner_callback(void *priv, int command, int mod

/* ------------------------------------------------------------------- */
/* some Divco specific stuff */
static int cx88_pv_8000gt_callback(void *priv, int command, int arg)
static int cx88_pv_8000gt_callback(struct cx88_core *core,
int command, int arg)
{
struct i2c_algo_bit_data *i2c_algo = priv;
struct cx88_core *core = i2c_algo->data;

switch (command) {
case XC2028_TUNER_RESET:
cx_write(MO_GP2_IO, 0xcf7);
Expand Down Expand Up @@ -2198,21 +2192,20 @@ static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
}
}

static int cx88_xc2028_tuner_callback(void *priv, int command, int arg)
static int cx88_xc2028_tuner_callback(struct cx88_core *core,
int command, int arg)
{
struct i2c_algo_bit_data *i2c_algo = priv;
struct cx88_core *core = i2c_algo->data;

/* Board-specific callbacks */
switch (core->boardnr) {
case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
case CX88_BOARD_GENIATECH_X8000_MT:
return cx88_xc3028_geniatech_tuner_callback(priv, command, arg);
return cx88_xc3028_geniatech_tuner_callback(core,
command, arg);
case CX88_BOARD_PROLINK_PV_8000GT:
return cx88_pv_8000gt_callback(priv, command, arg);
return cx88_pv_8000gt_callback(core, command, arg);
case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
return cx88_dvico_xc2028_callback(priv, command, arg);
return cx88_dvico_xc2028_callback(core, command, arg);
}

switch (command) {
Expand Down Expand Up @@ -2246,11 +2239,9 @@ static int cx88_xc2028_tuner_callback(void *priv, int command, int arg)
* PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
* analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */

static int cx88_xc5000_tuner_callback(void *priv, int command, int arg)
static int cx88_xc5000_tuner_callback(struct cx88_core *core,
int command, int arg)
{
struct i2c_algo_bit_data *i2c_algo = priv;
struct cx88_core *core = i2c_algo->data;

switch (core->boardnr) {
case CX88_BOARD_PINNACLE_PCTV_HD_800i:
if (command == 0) { /* This is the reset command from xc5000 */
Expand Down Expand Up @@ -2284,15 +2275,27 @@ static int cx88_xc5000_tuner_callback(void *priv, int command, int arg)
int cx88_tuner_callback(void *priv, int command, int arg)
{
struct i2c_algo_bit_data *i2c_algo = priv;
struct cx88_core *core = i2c_algo->data;
struct cx88_core *core;

if (!i2c_algo) {
printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
return -EINVAL;
}

core = i2c_algo->data;

if (!core) {
printk(KERN_ERR "cx88: Error - device struct undefined.\n");
return -EINVAL;
}

switch (core->board.tuner_type) {
case TUNER_XC2028:
info_printk(core, "Calling XC2028/3028 callback\n");
return cx88_xc2028_tuner_callback(priv, command, arg);
return cx88_xc2028_tuner_callback(core, command, arg);
case TUNER_XC5000:
info_printk(core, "Calling XC5000 callback\n");
return cx88_xc5000_tuner_callback(priv, command, arg);
return cx88_xc5000_tuner_callback(core, command, arg);
}
err_printk(core, "Error: Calling callback for tuner %d\n",
core->board.tuner_type);
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -5266,6 +5266,9 @@ int saa7134_tuner_callback(void *priv, int command, int arg)
case TUNER_XC2028:
return saa7134_xc2028_callback(dev, command, arg);
}
} else {
printk(KERN_ERR "saa7134: Error - device struct undefined.\n");
return -EINVAL;
}
return -EINVAL;
}
Expand Down

0 comments on commit f62211e

Please sign in to comment.