Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124063
b: refs/heads/master
c: ae9902d
h: refs/heads/master
i:
  124061: 3bf2379
  124059: 8aa0a93
  124055: 1b445c6
  124047: 9926ae8
  124031: 4259ab0
v: v3
  • Loading branch information
Manu Abraham authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent 80b35c6 commit 0a6e847
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 16 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: e0ee77acb1b849ce0ad729aff2427d3dc07ee5d1
refs/heads/master: ae9902da96b4d2d82707706c7fbc93a8e501dde8
17 changes: 16 additions & 1 deletion trunk/drivers/media/dvb/frontends/stb0899_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ struct stb0899_config {
int (*tuner_set_rfsiggain)(struct dvb_frontend *fe, u32 rf_gain);
};

extern struct dvb_frontend *stb0899_attach(struct stb0899_config *config, struct i2c_adapter *i2c);
#if defined(CONFIG_DVB_STB0899) || (defined(CONFIG_DVB_STB0899_MODULE) && defined(MODULE))

extern struct dvb_frontend *stb0899_attach(struct stb0899_config *config,
struct i2c_adapter *i2c);

#else

static inline struct dvb_frontend *stb0899_attach(struct stb0899_config *config,
struct i2c_adapter *i2c)
{
printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
return NULL;
}

#endif //CONFIG_DVB_STB0899


#endif
20 changes: 17 additions & 3 deletions trunk/drivers/media/dvb/frontends/stb6100.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,22 @@ struct stb6100_state {
u32 reference;
};

struct dvb_frontend *stb6100_attach(struct dvb_frontend *fe,
struct stb6100_config* config,
struct i2c_adapter *i2c);
#if defined(CONFIG_DVB_STB6100) || (defined(CONFIG_DVB_STB6100_MODULE) && defined(MODULE))

extern struct dvb_frontend *stb6100_attach(struct dvb_frontend *fe,
struct stb6100_config *config,
struct i2c_adapter *i2c);

#else

static inline struct dvb_frontend *stb6100_attach(struct dvb_frontend *fe,
struct stb6100_config *config,
struct i2c_adapter *i2c)
{
printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
return NULL;
}

#endif //CONFIG_DVB_STB6100

#endif
14 changes: 14 additions & 0 deletions trunk/drivers/media/dvb/frontends/tda8261.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,22 @@ struct tda8261_config {
enum tda8261_step step_size;
};

#if defined(CONFIG_DVB_TDA8261) || (defined(CONFIG_DVB_TDA8261_MODULE) && defined(MODULE))

extern struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe,
const struct tda8261_config *config,
struct i2c_adapter *i2c);

#else

static inline struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe,
const struct tda8261_config *config,
struct i2c_adapter *i2c)
{
printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
return NULL;
}

#endif //CONFIG_DVB_TDA8261

#endif// __TDA8261_H
4 changes: 2 additions & 2 deletions trunk/drivers/media/dvb/ttpci/budget-av.c
Original file line number Diff line number Diff line change
Expand Up @@ -1603,8 +1603,8 @@ static void frontend_init(struct budget_av *budget_av)
case SUBID_DVBS2_KNC1:
case SUBID_DVBS2_KNC1_OEM:
budget_av->reinitialise_demod = 1;
if ((fe = stb0899_attach(&knc1_dvbs2_config, &budget_av->budget.i2c_adap)))
tda8261_attach(fe, &sd1878c_config, &budget_av->budget.i2c_adap);
if ((fe = dvb_attach(stb0899_attach, &knc1_dvbs2_config, &budget_av->budget.i2c_adap)))
dvb_attach(tda8261_attach, fe, &sd1878c_config, &budget_av->budget.i2c_adap);

break;
case SUBID_DVBS_CINERGY1200:
Expand Down
15 changes: 6 additions & 9 deletions trunk/drivers/media/dvb/ttpci/budget-ci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1768,20 +1768,17 @@ static void frontend_init(struct budget_ci *budget_ci)
break;

case 0x1019: // TT S2-3200 PCI
budget_ci->budget.dvb_frontend = stb0899_attach(&tt3200_config, &budget_ci->budget.i2c_adap);
budget_ci->budget.dvb_frontend = dvb_attach(stb0899_attach, &tt3200_config, &budget_ci->budget.i2c_adap);
if (budget_ci->budget.dvb_frontend) {
if (stb6100_attach(budget_ci->budget.dvb_frontend, &tt3200_stb6100_config, &budget_ci->budget.i2c_adap)) {
if (!lnbp21_attach(budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, 0, 0)) {
if (dvb_attach(stb6100_attach, budget_ci->budget.dvb_frontend, &tt3200_stb6100_config, &budget_ci->budget.i2c_adap)) {
if (!dvb_attach(lnbp21_attach, budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, 0, 0)) {
printk("%s: No LNBP21 found!\n", __FUNCTION__);
if (budget_ci->budget.dvb_frontend->ops.tuner_ops.release)
budget_ci->budget.dvb_frontend->ops.tuner_ops.release(budget_ci->budget.dvb_frontend);
if (budget_ci->budget.dvb_frontend->ops.release)
budget_ci->budget.dvb_frontend->ops.release(budget_ci->budget.dvb_frontend);
dvb_frontend_detach(budget_ci->budget.dvb_frontend);
budget_ci->budget.dvb_frontend = NULL;
}
} else {
if (budget_ci->budget.dvb_frontend->ops.release)
budget_ci->budget.dvb_frontend->ops.release(budget_ci->budget.dvb_frontend);
dvb_frontend_detach(budget_ci->budget.dvb_frontend);
budget_ci->budget.dvb_frontend = NULL;
}
}
break;
Expand Down

0 comments on commit 0a6e847

Please sign in to comment.