Skip to content

Commit

Permalink
V4L/DVB (5976): mt2131 s5h1409: correct frontend selection logic
Browse files Browse the repository at this point in the history
If a card driver is compiled into the kernel and mt2131 or s5h1409 are
compiled as modules, the kernel won't link.

A compiled in driver can't use a module, so in this case the mt2131 or s5h1409
are effectively disabled w.r.t the compiled in driver and the stub attach
function should be used.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 19dc74b commit b97762b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/media/dvb/frontends/mt2131.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct mt2131_config {
u8 clock_out; /* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */
};

#if defined(CONFIG_DVB_TUNER_MT2131) || defined(CONFIG_DVB_TUNER_MT2131_MODULE)
#if defined(CONFIG_DVB_TUNER_MT2131) || (defined(CONFIG_DVB_TUNER_MT2131_MODULE) && defined(MODULE))
extern struct dvb_frontend* mt2131_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c,
struct mt2131_config *cfg,
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/dvb/frontends/s5h1409.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct s5h1409_config
u8 status_mode;
};

#if defined(CONFIG_DVB_S5H1409) || defined(CONFIG_DVB_S5H1409_MODULE)
#if defined(CONFIG_DVB_S5H1409) || (defined(CONFIG_DVB_S5H1409_MODULE) && defined(MODULE))
extern struct dvb_frontend* s5h1409_attach(const struct s5h1409_config* config,
struct i2c_adapter* i2c);
#else
Expand Down

0 comments on commit b97762b

Please sign in to comment.