Add and use IS_REACHABLE macro
Subsystems (23)
PATCH 1/1 Add and use IS_REACHABLE macro
In the media drivers, the v4l2 core knows about all submodules and calls into them from a common function. However this cannot work if the modules that get called are loadable and the core is built-in. In that case we get
drivers/built-in.o: In function `set_type':drivers/media/v4l2-core/tuner-core.c:301: undefined reference to tea5767_attach' drivers/media/v4l2-core/tuner-core.c:307: undefined reference to tea5761_attach' drivers/media/v4l2-core/tuner-core.c:349: undefined reference to tda9887_attach' drivers/media/v4l2-core/tuner-core.c:405: undefined reference to xc4000_attach'
This was working previously, until the IS_ENABLED() macro was used to replace the construct like
#if defined(CONFIG_DVB_CX24110) || (defined(CONFIG_DVB_CX24110_MODULE) && defined(MODULE))
with the difference that the new code no longer checks whether it is being built as a loadable module itself.
To fix this, this new patch adds an 'IS_REACHABLE' macro, which evaluates true in exactly the condition that was used previously. The downside of this is that this trades an obvious link error for a more subtle runtime failure, but it is clear that the change that introduced the link error was unintentional and it seems better to revert it for now. Also, a similar change was originally created by Trent Piepho and then reverted by teh change to the IS_ENABLED macro.
Ideally Kconfig would be used to avoid the case of a broken dependency, or the code restructured in a way to turn around the dependency, but either way would require much larger changes here.
See-also: c5dec9fb248e ("V4L/DVB (4751): Fix DBV_FE_CUSTOMISE for card drivers compiled into kernel")
---
dirstat:
69.2% drivers/media/dvb-frontends/
0.8% drivers/media/pci/cx23885/
25.5% drivers/media/tuners/
4.2% include/linux/
116 files changed, 125 insertions(+), 116 deletions(-)
drivers/media/dvb-frontends/a8293.h +1 -1
@@ -27,7 +27,7 @@ struct a8293_config {u8 i2c_addr; }; -#if IS_ENABLED (CONFIG_DVB_A8293 ) +#if IS_REACHABLE (CONFIG_DVB_A8293 )extern struct dvb_frontend *a8293_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,const struct a8293_config *cfg);#else
drivers/media/dvb-frontends/af9013.h +1 -1
@@ -103,7 +103,7 @@ struct af9013_config {u8 gpio[4 ]; }; -#if IS_ENABLED (CONFIG_DVB_AF9013 ) +#if IS_REACHABLE (CONFIG_DVB_AF9013 )extern struct dvb_frontend *af9013_attach (const struct af9013_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/atbm8830.h +1 -1
@@ -61,7 +61,7 @@ struct atbm8830_config {u8 agc_hold_loop; }; -#if IS_ENABLED (CONFIG_DVB_ATBM8830 ) +#if IS_REACHABLE (CONFIG_DVB_ATBM8830 )extern struct dvb_frontend *atbm8830_attach (const struct atbm8830_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/au8522.h +1 -1
@@ -61,7 +61,7 @@ struct au8522_config {enum au8522_if_freq qam_if; }; -#if IS_ENABLED (CONFIG_DVB_AU8522_DTV ) +#if IS_REACHABLE (CONFIG_DVB_AU8522_DTV )extern struct dvb_frontend *au8522_attach (const struct au8522_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/bcm3510.h +1 -1
@@ -34,7 +34,7 @@ struct bcm3510_configint (*request_firmware)(struct dvb_frontend * fe,const struct firmware **fw,char * name); }; -#if IS_ENABLED (CONFIG_DVB_BCM3510 ) +#if IS_REACHABLE (CONFIG_DVB_BCM3510 )extern struct dvb_frontend *bcm3510_attach (const struct bcm3510_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/cx22700.h +1 -1
@@ -31,7 +31,7 @@ struct cx22700_configu8 demod_address; }; -#if IS_ENABLED (CONFIG_DVB_CX22700 ) +#if IS_REACHABLE (CONFIG_DVB_CX22700 )extern struct dvb_frontend *cx22700_attach (const struct cx22700_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/cx22702.h +1 -1
@@ -41,7 +41,7 @@ struct cx22702_config {u8 output_mode; }; -#if IS_ENABLED (CONFIG_DVB_CX22702 ) +#if IS_REACHABLE (CONFIG_DVB_CX22702 )extern struct dvb_frontend *cx22702_attach (const struct cx22702_config *config,struct i2c_adapter *i2c);
drivers/media/dvb-frontends/cx24110.h +1 -1
@@ -46,7 +46,7 @@ static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val)return 0 ; } -#if IS_ENABLED (CONFIG_DVB_CX24110 ) +#if IS_REACHABLE (CONFIG_DVB_CX24110 )extern struct dvb_frontend *cx24110_attach (const struct cx24110_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/cx24113.h +1 -1
@@ -32,7 +32,7 @@ struct cx24113_config {u32 xtal_khz; }; -#if IS_ENABLED (CONFIG_DVB_TUNER_CX24113 ) +#if IS_REACHABLE (CONFIG_DVB_TUNER_CX24113 )extern struct dvb_frontend *cx24113_attach (struct dvb_frontend *,const struct cx24113_config *config,struct i2c_adapter *i2c);
drivers/media/dvb-frontends/cx24116.h +1 -1
@@ -41,7 +41,7 @@ struct cx24116_config {u16 i2c_wr_max; }; -#if IS_ENABLED (CONFIG_DVB_CX24116 ) +#if IS_REACHABLE (CONFIG_DVB_CX24116 )extern struct dvb_frontend *cx24116_attach (const struct cx24116_config *config,struct i2c_adapter *i2c);
drivers/media/dvb-frontends/cx24117.h +1 -1
@@ -30,7 +30,7 @@ struct cx24117_config {u8 demod_address; }; -#if IS_ENABLED (CONFIG_DVB_CX24117 ) +#if IS_REACHABLE (CONFIG_DVB_CX24117 )extern struct dvb_frontend *cx24117_attach (const struct cx24117_config *config,struct i2c_adapter *i2c);
drivers/media/dvb-frontends/cx24123.h +1 -1
@@ -39,7 +39,7 @@ struct cx24123_config {void (*agc_callback) (struct dvb_frontend *); }; -#if IS_ENABLED (CONFIG_DVB_CX24123 ) +#if IS_REACHABLE (CONFIG_DVB_CX24123 )extern struct dvb_frontend *cx24123_attach (const struct cx24123_config *config,struct i2c_adapter *i2c);extern struct i2c_adapter *cx24123_get_tuner_i2c_adapter (struct dvb_frontend *);
drivers/media/dvb-frontends/cxd2820r.h +1 -1
@@ -72,7 +72,7 @@ struct cxd2820r_config { }; -#if IS_ENABLED (CONFIG_DVB_CXD2820R ) +#if IS_REACHABLE (CONFIG_DVB_CXD2820R ) extern struct dvb_frontend *cxd2820r_attach( const struct cxd2820r_config *config, struct i2c_adapter *i2c,
drivers/media/dvb-frontends/dib0070.h +1 -1
@@ -48,7 +48,7 @@ struct dib0070_config {u8 vga_filter; }; -#if IS_ENABLED (CONFIG_DVB_TUNER_DIB0070 ) +#if IS_REACHABLE (CONFIG_DVB_TUNER_DIB0070 )extern struct dvb_frontend *dib0070_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct dib0070_config *cfg);extern u16 dib0070_wbd_offset (struct dvb_frontend *);extern void dib0070_ctrl_agc_filter (struct dvb_frontend *,u8 open);
drivers/media/dvb-frontends/dib0090.h +1 -1
@@ -75,7 +75,7 @@ struct dib0090_config {u8 force_crystal_mode; }; -#if IS_ENABLED (CONFIG_DVB_TUNER_DIB0090 ) +#if IS_REACHABLE (CONFIG_DVB_TUNER_DIB0090 )extern struct dvb_frontend *dib0090_register (struct dvb_frontend *fe,struct i2c_adapter *i2c,const struct dib0090_config *config);extern struct dvb_frontend *dib0090_fw_register (struct dvb_frontend *fe,struct i2c_adapter *i2c,const struct dib0090_config *config);extern void dib0090_dcc_freq (struct dvb_frontend *fe,u8 fast);
drivers/media/dvb-frontends/dib3000.h +1 -1
@@ -41,7 +41,7 @@ struct dib_fe_xfer_opsint (*tuner_pass_ctrl)(struct dvb_frontend *fe,int onoff,u8 pll_ctrl); }; -#if IS_ENABLED (CONFIG_DVB_DIB3000MB ) +#if IS_REACHABLE (CONFIG_DVB_DIB3000MB )extern struct dvb_frontend *dib3000mb_attach (const struct dib3000_config * config,struct i2c_adapter * i2c,struct dib_fe_xfer_ops *xfer_ops);#else
drivers/media/dvb-frontends/dib3000mc.h +1 -1
@@ -41,7 +41,7 @@ struct dib3000mc_config {#define DEFAULT_DIB3000MC_I2C_ADDRESS 16#define DEFAULT_DIB3000P_I2C_ADDRESS 24 -#if IS_ENABLED (CONFIG_DVB_DIB3000MC ) +#if IS_REACHABLE (CONFIG_DVB_DIB3000MC )extern struct dvb_frontend *dib3000mc_attach (struct i2c_adapter *i2c_adap,u8 i2c_addr,struct dib3000mc_config *cfg);
drivers/media/dvb-frontends/dib7000m.h +1 -1
@@ -40,7 +40,7 @@ struct dib7000m_config {#define DEFAULT_DIB7000M_I2C_ADDRESS 18 -#if IS_ENABLED (CONFIG_DVB_DIB7000M ) +#if IS_REACHABLE (CONFIG_DVB_DIB7000M )extern struct dvb_frontend *dib7000m_attach (struct i2c_adapter *i2c_adap,u8 i2c_addr,struct dib7000m_config *cfg);
drivers/media/dvb-frontends/dib7000p.h +1 -1
@@ -66,7 +66,7 @@ struct dib7000p_ops {struct dvb_frontend *(*init)(struct i2c_adapter *i2c_adap,u8 i2c_addr,struct dib7000p_config *cfg); }; -#if IS_ENABLED (CONFIG_DVB_DIB7000P ) +#if IS_REACHABLE (CONFIG_DVB_DIB7000P )void *dib7000p_attach (struct dib7000p_ops *ops);#else static inline void *dib7000p_attach (struct dib7000p_ops *ops)
drivers/media/dvb-frontends/dib8000.h +1 -1
@@ -63,7 +63,7 @@ struct dib8000_ops {struct dvb_frontend *(*init)(struct i2c_adapter *i2c_adap,u8 i2c_addr,struct dib8000_config *cfg); }; -#if IS_ENABLED (CONFIG_DVB_DIB8000 ) +#if IS_REACHABLE (CONFIG_DVB_DIB8000 )void *dib8000_attach (struct dib8000_ops *ops);#else static inline int dib8000_attach (struct dib8000_ops *ops)
drivers/media/dvb-frontends/dib9000.h +1 -1
@@ -27,7 +27,7 @@ struct dib9000_config {#define DEFAULT_DIB9000_I2C_ADDRESS 18 -#if IS_ENABLED (CONFIG_DVB_DIB9000 ) +#if IS_REACHABLE (CONFIG_DVB_DIB9000 )extern struct dvb_frontend *dib9000_attach (struct i2c_adapter *i2c_adap,u8 i2c_addr,const struct dib9000_config *cfg);extern int dib9000_i2c_enumeration (struct i2c_adapter *host,int no_of_demods,u8 default_addr,u8 first_addr);extern struct i2c_adapter *dib9000_get_tuner_interface (struct dvb_frontend *fe);
drivers/media/dvb-frontends/drxd.h +1 -1
@@ -52,7 +52,7 @@ struct drxd_config {s16 (*osc_deviation) (void *priv,s16 dev,int flag); }; -#if IS_ENABLED (CONFIG_DVB_DRXD ) +#if IS_REACHABLE (CONFIG_DVB_DRXD )extern struct dvb_frontend *drxd_attach(const struct drxd_config *config, void *priv, struct i2c_adapter *i2c,
drivers/media/dvb-frontends/drxk.h +1 -1
@@ -51,7 +51,7 @@ struct drxk_config {int qam_demod_parameter_count; }; -#if IS_ENABLED (CONFIG_DVB_DRXK ) +#if IS_REACHABLE (CONFIG_DVB_DRXK )extern struct dvb_frontend *drxk_attach (const struct drxk_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/ds3000.h +1 -1
@@ -35,7 +35,7 @@ struct ds3000_config {void (*set_lock_led)(struct dvb_frontend *fe,int offon); }; -#if IS_ENABLED (CONFIG_DVB_DS3000 ) +#if IS_REACHABLE (CONFIG_DVB_DS3000 )extern struct dvb_frontend *ds3000_attach (const struct ds3000_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/dvb-pll.h +1 -1
@@ -38,7 +38,7 @@* @param pll_desc_id dvb_pll_desc to use. * @return Frontend pointer on success, NULL on failure */ -#if IS_ENABLED (CONFIG_DVB_PLL ) +#if IS_REACHABLE (CONFIG_DVB_PLL ) extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c,
drivers/media/dvb-frontends/dvb_dummy_fe.h +1 -1
@@ -26,7 +26,7 @@#include <linux/dvb/frontend.h> #include "dvb_frontend.h" -#if IS_ENABLED (CONFIG_DVB_DUMMY_FE ) +#if IS_REACHABLE (CONFIG_DVB_DUMMY_FE )extern struct dvb_frontend *dvb_dummy_fe_ofdm_attach (void );extern struct dvb_frontend *dvb_dummy_fe_qpsk_attach (void );extern struct dvb_frontend *dvb_dummy_fe_qam_attach (void );
drivers/media/dvb-frontends/ec100.h +1 -1
@@ -31,7 +31,7 @@ struct ec100_config { }; -#if IS_ENABLED (CONFIG_DVB_EC100 ) +#if IS_REACHABLE (CONFIG_DVB_EC100 )extern struct dvb_frontend *ec100_attach (const struct ec100_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/hd29l2.h +1 -1
@@ -51,7 +51,7 @@ struct hd29l2_config { }; -#if IS_ENABLED (CONFIG_DVB_HD29L2 ) +#if IS_REACHABLE (CONFIG_DVB_HD29L2 )extern struct dvb_frontend *hd29l2_attach (const struct hd29l2_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/isl6405.h +1 -1
@@ -55,7 +55,7 @@#define ISL6405_ENT2 0x20#define ISL6405_ISEL2 0x40 -#if IS_ENABLED (CONFIG_DVB_ISL6405 ) +#if IS_REACHABLE (CONFIG_DVB_ISL6405 )/* override_set and override_clear control which system register bits (above) * to always set & clear */
drivers/media/dvb-frontends/isl6421.h +1 -1
@@ -39,7 +39,7 @@#define ISL6421_ISEL1 0x20#define ISL6421_DCL 0x40 -#if IS_ENABLED (CONFIG_DVB_ISL6421 ) +#if IS_REACHABLE (CONFIG_DVB_ISL6421 )/* override_set and override_clear control which system register bits (above) to always set & clear */ extern struct dvb_frontend *isl6421_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,u8 i2c_addr,u8 override_set,u8 override_clear,bool override_tone);
drivers/media/dvb-frontends/isl6423.h +1 -1
@@ -42,7 +42,7 @@ struct isl6423_config {u8 mod_extern; }; -#if IS_ENABLED (CONFIG_DVB_ISL6423 ) +#if IS_REACHABLE (CONFIG_DVB_ISL6423 ) extern struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe,
drivers/media/dvb-frontends/itd1000.h +1 -1
@@ -29,7 +29,7 @@ struct itd1000_config {u8 i2c_address; }; -#if IS_ENABLED (CONFIG_DVB_TUNER_ITD1000 ) +#if IS_REACHABLE (CONFIG_DVB_TUNER_ITD1000 )extern struct dvb_frontend *itd1000_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct itd1000_config *cfg);#else static inline struct dvb_frontend *itd1000_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct itd1000_config *cfg)
drivers/media/dvb-frontends/ix2505v.h +1 -1
@@ -49,7 +49,7 @@ struct ix2505v_config { }; -#if IS_ENABLED (CONFIG_DVB_IX2505V ) +#if IS_REACHABLE (CONFIG_DVB_IX2505V )extern struct dvb_frontend *ix2505v_attach (struct dvb_frontend *fe,const struct ix2505v_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/l64781.h +1 -1
@@ -31,7 +31,7 @@ struct l64781_configu8 demod_address; }; -#if IS_ENABLED (CONFIG_DVB_L64781 ) +#if IS_REACHABLE (CONFIG_DVB_L64781 )extern struct dvb_frontend *l64781_attach (const struct l64781_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/lg2160.h +1 -1
@@ -67,7 +67,7 @@ struct lg2160_config {enum lg_chip_type lg_chip; }; -#if IS_ENABLED (CONFIG_DVB_LG2160 ) +#if IS_REACHABLE (CONFIG_DVB_LG2160 )extern struct dvb_frontend *lg2160_attach (const struct lg2160_config *config,struct i2c_adapter *i2c_adap);
drivers/media/dvb-frontends/lgdt3305.h +1 -1
@@ -80,7 +80,7 @@ struct lgdt3305_config {enum lgdt_demod_chip_type demod_chip; }; -#if IS_ENABLED (CONFIG_DVB_LGDT3305 ) +#if IS_REACHABLE (CONFIG_DVB_LGDT3305 )extern struct dvb_frontend *lgdt3305_attach (const struct lgdt3305_config *config,struct i2c_adapter *i2c_adap);
drivers/media/dvb-frontends/lgdt330x.h +1 -1
@@ -52,7 +52,7 @@ struct lgdt330x_configint clock_polarity_flip; }; -#if IS_ENABLED (CONFIG_DVB_LGDT330X ) +#if IS_REACHABLE (CONFIG_DVB_LGDT330X )extern struct dvb_frontend *lgdt330x_attach (const struct lgdt330x_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/lgs8gl5.h +1 -1
@@ -31,7 +31,7 @@ struct lgs8gl5_config {u8 demod_address; }; -#if IS_ENABLED (CONFIG_DVB_LGS8GL5 ) +#if IS_REACHABLE (CONFIG_DVB_LGS8GL5 )extern struct dvb_frontend *lgs8gl5_attach (const struct lgs8gl5_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/lgs8gxx.h +1 -1
@@ -80,7 +80,7 @@ struct lgs8gxx_config {u8 tuner_address; }; -#if IS_ENABLED (CONFIG_DVB_LGS8GXX ) +#if IS_REACHABLE (CONFIG_DVB_LGS8GXX )extern struct dvb_frontend *lgs8gxx_attach (const struct lgs8gxx_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/lnbh24.h +1 -1
@@ -37,7 +37,7 @@#include <linux/dvb/frontend.h> -#if IS_ENABLED (CONFIG_DVB_LNBP21 ) +#if IS_REACHABLE (CONFIG_DVB_LNBP21 )/* override_set and override_clear control which system register bits (above) to always set & clear */ extern struct dvb_frontend *lnbh24_attach(struct dvb_frontend *fe,
drivers/media/dvb-frontends/lnbp21.h +1 -1
@@ -57,7 +57,7 @@#include <linux/dvb/frontend.h> -#if IS_ENABLED (CONFIG_DVB_LNBP21 ) +#if IS_REACHABLE (CONFIG_DVB_LNBP21 )/* override_set and override_clear control which system register bits (above) to always set & clear */ extern struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,
drivers/media/dvb-frontends/lnbp22.h +1 -1
@@ -39,7 +39,7 @@#include <linux/dvb/frontend.h> -#if IS_ENABLED (CONFIG_DVB_LNBP22 ) +#if IS_REACHABLE (CONFIG_DVB_LNBP22 )/* * override_set and override_clear control which system register bits (above) * to always set & clear
drivers/media/dvb-frontends/m88rs2000.h +1 -1
@@ -41,7 +41,7 @@ enum { CALL_IS_READ, }; -#if IS_ENABLED (CONFIG_DVB_M88RS2000 ) +#if IS_REACHABLE (CONFIG_DVB_M88RS2000 )extern struct dvb_frontend *m88rs2000_attach (const struct m88rs2000_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/mb86a16.h +1 -1
@@ -33,7 +33,7 @@ struct mb86a16_config { -#if IS_ENABLED (CONFIG_DVB_MB86A16 ) +#if IS_REACHABLE (CONFIG_DVB_MB86A16 )extern struct dvb_frontend *mb86a16_attach (const struct mb86a16_config *config,struct i2c_adapter *i2c_adap);
drivers/media/dvb-frontends/mb86a20s.h +1 -1
@@ -34,7 +34,7 @@ struct mb86a20s_config {bool is_serial; }; -#if IS_ENABLED (CONFIG_DVB_MB86A20S ) +#if IS_REACHABLE (CONFIG_DVB_MB86A20S )extern struct dvb_frontend *mb86a20s_attach (const struct mb86a20s_config *config,struct i2c_adapter *i2c);extern struct i2c_adapter *mb86a20s_get_tuner_i2c_adapter (struct dvb_frontend *);
drivers/media/dvb-frontends/mt312.h +1 -1
@@ -36,7 +36,7 @@ struct mt312_config { unsigned int voltage_inverted:1; }; -#if IS_ENABLED (CONFIG_DVB_MT312 ) +#if IS_REACHABLE (CONFIG_DVB_MT312 )struct dvb_frontend *mt312_attach (const struct mt312_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/mt352.h +1 -1
@@ -51,7 +51,7 @@ struct mt352_configint (*demod_init)(struct dvb_frontend * fe); }; -#if IS_ENABLED (CONFIG_DVB_MT352 ) +#if IS_REACHABLE (CONFIG_DVB_MT352 )extern struct dvb_frontend *mt352_attach (const struct mt352_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/nxt200x.h +1 -1
@@ -42,7 +42,7 @@ struct nxt200x_configint (*set_ts_params)(struct dvb_frontend * fe,int is_punctured); }; -#if IS_ENABLED (CONFIG_DVB_NXT200X ) +#if IS_REACHABLE (CONFIG_DVB_NXT200X )extern struct dvb_frontend *nxt200x_attach (const struct nxt200x_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/nxt6000.h +1 -1
@@ -33,7 +33,7 @@ struct nxt6000_config u8 clock_inversion:1; }; -#if IS_ENABLED (CONFIG_DVB_NXT6000 ) +#if IS_REACHABLE (CONFIG_DVB_NXT6000 )extern struct dvb_frontend *nxt6000_attach (const struct nxt6000_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/or51132.h +1 -1
@@ -34,7 +34,7 @@ struct or51132_configint (*set_ts_params)(struct dvb_frontend * fe,int is_punctured); }; -#if IS_ENABLED (CONFIG_DVB_OR51132 ) +#if IS_REACHABLE (CONFIG_DVB_OR51132 )extern struct dvb_frontend *or51132_attach (const struct or51132_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/or51211.h +1 -1
@@ -37,7 +37,7 @@ struct or51211_configvoid (*sleep)(struct dvb_frontend * fe); }; -#if IS_ENABLED (CONFIG_DVB_OR51211 ) +#if IS_REACHABLE (CONFIG_DVB_OR51211 )extern struct dvb_frontend *or51211_attach (const struct or51211_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/s5h1409.h +1 -1
@@ -67,7 +67,7 @@ struct s5h1409_config {u8 hvr1600_opt; }; -#if IS_ENABLED (CONFIG_DVB_S5H1409 ) +#if IS_REACHABLE (CONFIG_DVB_S5H1409 )extern struct dvb_frontend *s5h1409_attach (const struct s5h1409_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/s5h1411.h +1 -1
@@ -69,7 +69,7 @@ struct s5h1411_config {u8 status_mode; }; -#if IS_ENABLED (CONFIG_DVB_S5H1411 ) +#if IS_REACHABLE (CONFIG_DVB_S5H1411 )extern struct dvb_frontend *s5h1411_attach (const struct s5h1411_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/s5h1420.h +1 -1
@@ -40,7 +40,7 @@ struct s5h1420_config u8 serial_mpeg:1; }; -#if IS_ENABLED (CONFIG_DVB_S5H1420 ) +#if IS_REACHABLE (CONFIG_DVB_S5H1420 )extern struct dvb_frontend *s5h1420_attach (const struct s5h1420_config *config,struct i2c_adapter *i2c);extern struct i2c_adapter *s5h1420_get_tuner_i2c_adapter (struct dvb_frontend *fe);
drivers/media/dvb-frontends/s5h1432.h +1 -1
@@ -75,7 +75,7 @@ struct s5h1432_config {u8 status_mode; }; -#if IS_ENABLED (CONFIG_DVB_S5H1432 ) +#if IS_REACHABLE (CONFIG_DVB_S5H1432 )extern struct dvb_frontend *s5h1432_attach (const struct s5h1432_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/s921.h +1 -1
@@ -25,7 +25,7 @@ struct s921_config {u8 demod_address; }; -#if IS_ENABLED (CONFIG_DVB_S921 ) +#if IS_REACHABLE (CONFIG_DVB_S921 )extern struct dvb_frontend *s921_attach (const struct s921_config *config,struct i2c_adapter *i2c);extern struct i2c_adapter *s921_get_tuner_i2c_adapter (struct dvb_frontend *);
drivers/media/dvb-frontends/si21xx.h +1 -1
@@ -13,7 +13,7 @@ struct si21xx_config {int min_delay_ms; }; -#if IS_ENABLED (CONFIG_DVB_SI21XX ) +#if IS_REACHABLE (CONFIG_DVB_SI21XX )extern struct dvb_frontend *si21xx_attach (const struct si21xx_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/sp8870.h +1 -1
@@ -35,7 +35,7 @@ struct sp8870_configint (*request_firmware)(struct dvb_frontend * fe,const struct firmware **fw,char * name); }; -#if IS_ENABLED (CONFIG_DVB_SP8870 ) +#if IS_REACHABLE (CONFIG_DVB_SP8870 )extern struct dvb_frontend *sp8870_attach (const struct sp8870_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/sp887x.h +1 -1
@@ -17,7 +17,7 @@ struct sp887x_configint (*request_firmware)(struct dvb_frontend * fe,const struct firmware **fw,char * name); }; -#if IS_ENABLED (CONFIG_DVB_SP887X ) +#if IS_REACHABLE (CONFIG_DVB_SP887X )extern struct dvb_frontend *sp887x_attach (const struct sp887x_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/stb0899_drv.h +1 -1
@@ -141,7 +141,7 @@ struct stb0899_config {int (*tuner_set_rfsiggain)(struct dvb_frontend *fe,u32 rf_gain); }; -#if IS_ENABLED (CONFIG_DVB_STB0899 ) +#if IS_REACHABLE (CONFIG_DVB_STB0899 )extern struct dvb_frontend *stb0899_attach (struct stb0899_config *config,struct i2c_adapter *i2c);
drivers/media/dvb-frontends/stb6000.h +1 -1
@@ -35,7 +35,7 @@* @param i2c i2c adapter to use. * @return FE pointer on success, NULL on failure. */ -#if IS_ENABLED (CONFIG_DVB_STB6000 ) +#if IS_REACHABLE (CONFIG_DVB_STB6000 )extern struct dvb_frontend *stb6000_attach (struct dvb_frontend *fe,int addr,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/stb6100.h +1 -1
@@ -94,7 +94,7 @@ struct stb6100_state {u32 reference; }; -#if IS_ENABLED (CONFIG_DVB_STB6100 ) +#if IS_REACHABLE (CONFIG_DVB_STB6100 ) extern struct dvb_frontend *stb6100_attach(struct dvb_frontend *fe, const struct stb6100_config *config,
drivers/media/dvb-frontends/stv0288.h +1 -1
@@ -43,7 +43,7 @@ struct stv0288_config {int (*set_ts_params)(struct dvb_frontend *fe,int is_punctured); }; -#if IS_ENABLED (CONFIG_DVB_STV0288 ) +#if IS_REACHABLE (CONFIG_DVB_STV0288 )extern struct dvb_frontend *stv0288_attach (const struct stv0288_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/stv0297.h +1 -1
@@ -42,7 +42,7 @@ struct stv0297_config u8 stop_during_read:1; }; -#if IS_ENABLED (CONFIG_DVB_STV0297 ) +#if IS_REACHABLE (CONFIG_DVB_STV0297 )extern struct dvb_frontend *stv0297_attach (const struct stv0297_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/stv0299.h +1 -1
@@ -95,7 +95,7 @@ struct stv0299_configint (*set_ts_params)(struct dvb_frontend *fe,int is_punctured); }; -#if IS_ENABLED (CONFIG_DVB_STV0299 ) +#if IS_REACHABLE (CONFIG_DVB_STV0299 )extern struct dvb_frontend *stv0299_attach (const struct stv0299_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/stv0367.h +1 -1
@@ -39,7 +39,7 @@ struct stv0367_config {int clk_pol; }; -#if IS_ENABLED (CONFIG_DVB_STV0367 ) +#if IS_REACHABLE (CONFIG_DVB_STV0367 )extern struct dvb_frontend *stv0367ter_attach (const struct stv0367_config *config,struct i2c_adapter *i2c);
drivers/media/dvb-frontends/stv0900.h +1 -1
@@ -58,7 +58,7 @@ struct stv0900_config {void (*set_lock_led)(struct dvb_frontend *fe,int offon); }; -#if IS_ENABLED (CONFIG_DVB_STV0900 ) +#if IS_REACHABLE (CONFIG_DVB_STV0900 )extern struct dvb_frontend *stv0900_attach (const struct stv0900_config *config,struct i2c_adapter *i2c,int demod);#else
drivers/media/dvb-frontends/stv090x.h +1 -1
@@ -107,7 +107,7 @@ struct stv090x_config { u8 xor_value); }; -#if IS_ENABLED (CONFIG_DVB_STV090x) +#if IS_REACHABLE (CONFIG_DVB_STV090x) struct dvb_frontend *stv090x_attach(struct stv090x_config *config, struct i2c_adapter *i2c,
drivers/media/dvb-frontends/stv6110.h +1 -1
@@ -46,7 +46,7 @@ struct stv6110_config {u8 clk_div;/* divisor value for the output clock */ }; -#if IS_ENABLED (CONFIG_DVB_STV6110 ) +#if IS_REACHABLE (CONFIG_DVB_STV6110 )extern struct dvb_frontend *stv6110_attach (struct dvb_frontend *fe,const struct stv6110_config *config,struct i2c_adapter *i2c);
drivers/media/dvb-frontends/stv6110x.h +1 -1
@@ -53,7 +53,7 @@ struct stv6110x_devctl { }; -#if IS_ENABLED (CONFIG_DVB_STV6110x) +#if IS_REACHABLE (CONFIG_DVB_STV6110x) extern struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe, const struct stv6110x_config *config,
drivers/media/dvb-frontends/tda1002x.h +2 -2
@@ -57,7 +57,7 @@ struct tda10023_config {u16 deltaf; }; -#if IS_ENABLED (CONFIG_DVB_TDA10021 ) +#if IS_REACHABLE (CONFIG_DVB_TDA10021 )extern struct dvb_frontend *tda10021_attach (const struct tda1002x_config * config,struct i2c_adapter * i2c,u8 pwm);#else
@@ -69,7 +69,7 @@ static inline struct dvb_frontend* tda10021_attach(const struct tda1002x_config* }#endif // CONFIG_DVB_TDA10021 -#if IS_ENABLED (CONFIG_DVB_TDA10023 ) +#if IS_REACHABLE (CONFIG_DVB_TDA10023 )extern struct dvb_frontend *tda10023_attach (const struct tda10023_config *config,struct i2c_adapter *i2c,u8 pwm);
drivers/media/dvb-frontends/tda10048.h +1 -1
@@ -73,7 +73,7 @@ struct tda10048_config {u8 pll_n; }; -#if IS_ENABLED (CONFIG_DVB_TDA10048 ) +#if IS_REACHABLE (CONFIG_DVB_TDA10048 )extern struct dvb_frontend *tda10048_attach (const struct tda10048_config *config,struct i2c_adapter *i2c);
drivers/media/dvb-frontends/tda1004x.h +1 -1
@@ -117,7 +117,7 @@ struct tda1004x_state {enum tda1004x_demod demod_type; }; -#if IS_ENABLED (CONFIG_DVB_TDA1004X ) +#if IS_REACHABLE (CONFIG_DVB_TDA1004X )extern struct dvb_frontend *tda10045_attach (const struct tda1004x_config * config,struct i2c_adapter * i2c);
drivers/media/dvb-frontends/tda10071.h +1 -1
@@ -72,7 +72,7 @@ struct tda10071_config { }; -#if IS_ENABLED (CONFIG_DVB_TDA10071 ) +#if IS_REACHABLE (CONFIG_DVB_TDA10071 )extern struct dvb_frontend *tda10071_attach (const struct tda10071_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/tda10086.h +1 -1
@@ -46,7 +46,7 @@ struct tda10086_configenum tda10086_xtal xtal_freq; }; -#if IS_ENABLED (CONFIG_DVB_TDA10086 ) +#if IS_REACHABLE (CONFIG_DVB_TDA10086 )extern struct dvb_frontend *tda10086_attach (const struct tda10086_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/tda18271c2dd.h +1 -1
@@ -3,7 +3,7 @@#include <linux/kconfig.h> -#if IS_ENABLED (CONFIG_DVB_TDA18271C2DD ) +#if IS_REACHABLE (CONFIG_DVB_TDA18271C2DD )struct dvb_frontend *tda18271c2dd_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,u8 adr);#else
drivers/media/dvb-frontends/tda665x.h +1 -1
@@ -31,7 +31,7 @@ struct tda665x_config {u32 ref_divider; }; -#if IS_ENABLED (CONFIG_DVB_TDA665x) +#if IS_REACHABLE (CONFIG_DVB_TDA665x) extern struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe, const struct tda665x_config *config,
drivers/media/dvb-frontends/tda8083.h +1 -1
@@ -35,7 +35,7 @@ struct tda8083_configu8 demod_address; }; -#if IS_ENABLED (CONFIG_DVB_TDA8083 ) +#if IS_REACHABLE (CONFIG_DVB_TDA8083 )extern struct dvb_frontend *tda8083_attach (const struct tda8083_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/tda8261.h +1 -1
@@ -34,7 +34,7 @@ struct tda8261_config {enum tda8261_step step_size; }; -#if IS_ENABLED (CONFIG_DVB_TDA8261 ) +#if IS_REACHABLE (CONFIG_DVB_TDA8261 ) extern struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe, const struct tda8261_config *config,
drivers/media/dvb-frontends/tda826x.h +1 -1
@@ -35,7 +35,7 @@* @param has_loopthrough Set to 1 if the card has a loopthrough RF connector. * @return FE pointer on success, NULL on failure. */ -#if IS_ENABLED (CONFIG_DVB_TDA826X ) +#if IS_REACHABLE (CONFIG_DVB_TDA826X )extern struct dvb_frontend *tda826x_attach (struct dvb_frontend *fe,int addr,struct i2c_adapter *i2c,int has_loopthrough);
drivers/media/dvb-frontends/ts2020.h +1 -1
@@ -31,7 +31,7 @@ struct ts2020_config {u32 frequency_div; }; -#if IS_ENABLED (CONFIG_DVB_TS2020 ) +#if IS_REACHABLE (CONFIG_DVB_TS2020 ) extern struct dvb_frontend *ts2020_attach( struct dvb_frontend *fe,
drivers/media/dvb-frontends/tua6100.h +1 -1
@@ -34,7 +34,7 @@#include <linux/i2c.h> #include "dvb_frontend.h" -#if IS_ENABLED (CONFIG_DVB_TUA6100 ) +#if IS_REACHABLE (CONFIG_DVB_TUA6100 )extern struct dvb_frontend *tua6100_attach (struct dvb_frontend *fe,int addr,struct i2c_adapter *i2c);#else static inline struct dvb_frontend *tua6100_attach (struct dvb_frontend *fe,int addr,struct i2c_adapter *i2c)
drivers/media/dvb-frontends/ves1820.h +1 -1
@@ -41,7 +41,7 @@ struct ves1820_config u8 selagc:1; }; -#if IS_ENABLED (CONFIG_DVB_VES1820 ) +#if IS_REACHABLE (CONFIG_DVB_VES1820 )extern struct dvb_frontend *ves1820_attach (const struct ves1820_config * config,struct i2c_adapter * i2c,u8 pwm);#else
drivers/media/dvb-frontends/ves1x93.h +1 -1
@@ -40,7 +40,7 @@ struct ves1x93_config u8 invert_pwm:1; }; -#if IS_ENABLED (CONFIG_DVB_VES1X93 ) +#if IS_REACHABLE (CONFIG_DVB_VES1X93 )extern struct dvb_frontend *ves1x93_attach (const struct ves1x93_config * config,struct i2c_adapter * i2c);#else
drivers/media/dvb-frontends/zl10036.h +1 -1
@@ -38,7 +38,7 @@ struct zl10036_config {int rf_loop_enable; }; -#if IS_ENABLED (CONFIG_DVB_ZL10036 ) +#if IS_REACHABLE (CONFIG_DVB_ZL10036 )extern struct dvb_frontend *zl10036_attach (struct dvb_frontend *fe,const struct zl10036_config *config,struct i2c_adapter *i2c);#else
drivers/media/dvb-frontends/zl10039.h +1 -1
@@ -24,7 +24,7 @@#include <linux/kconfig.h> -#if IS_ENABLED (CONFIG_DVB_ZL10039 ) +#if IS_REACHABLE (CONFIG_DVB_ZL10039 )struct dvb_frontend *zl10039_attach (struct dvb_frontend *fe,u8 i2c_addr,struct i2c_adapter *i2c);
drivers/media/dvb-frontends/zl10353.h +1 -1
@@ -47,7 +47,7 @@ struct zl10353_configu8 pll_0;/* default: 0x15 */ }; -#if IS_ENABLED (CONFIG_DVB_ZL10353 ) +#if IS_REACHABLE (CONFIG_DVB_ZL10353 )extern struct dvb_frontend *zl10353_attach (const struct zl10353_config *config,struct i2c_adapter *i2c);#else
drivers/media/pci/cx23885/altera-ci.h +1 -1
@@ -39,7 +39,7 @@ struct altera_ci_config {int (*fpga_rw) (void *dev,int ad_rg,int val,int rw); }; -#if IS_ENABLED (CONFIG_MEDIA_ALTERA_CI ) +#if IS_REACHABLE (CONFIG_MEDIA_ALTERA_CI )extern int altera_ci_init (struct altera_ci_config *config,int ci_nr);extern void altera_ci_release (void *dev,int ci_nr);
drivers/media/tuners/fc0011.h +1 -1
@@ -23,7 +23,7 @@ enum fc0011_fe_callback_commands { FC0011_FE_CALLBACK_RESET, }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_FC0011 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_FC0011 )struct dvb_frontend *fc0011_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,const struct fc0011_config *config);
drivers/media/tuners/fc0012.h +1 -1
@@ -49,7 +49,7 @@ struct fc0012_config {bool clock_out; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_FC0012 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_FC0012 )extern struct dvb_frontend *fc0012_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,const struct fc0012_config *cfg);
drivers/media/tuners/fc0013.h +1 -1
@@ -26,7 +26,7 @@#include "dvb_frontend.h" #include "fc001x-common.h" -#if IS_ENABLED (CONFIG_MEDIA_TUNER_FC0013 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_FC0013 ) extern struct dvb_frontend *fc0013_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_address, int dual_master,
drivers/media/tuners/fc2580.h +1 -1
@@ -37,7 +37,7 @@ struct fc2580_config {u32 clock; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_FC2580 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_FC2580 )extern struct dvb_frontend *fc2580_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,const struct fc2580_config *cfg);#else
drivers/media/tuners/max2165.h +1 -1
@@ -32,7 +32,7 @@ struct max2165_config {u8 osc_clk;/* in MHz, selectable values: 4,16,18,20,22,24,26,28 */ }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_MAX2165 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_MAX2165 )extern struct dvb_frontend *max2165_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct max2165_config *cfg);
drivers/media/tuners/mc44s803.h +1 -1
@@ -32,7 +32,7 @@ struct mc44s803_config {u8 dig_out; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_MC44S803 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_MC44S803 )extern struct dvb_frontend *mc44s803_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct mc44s803_config *cfg);#else
drivers/media/tuners/mt2060.h +1 -1
@@ -30,7 +30,7 @@ struct mt2060_config {u8 clock_out;/* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */ }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_MT2060 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_MT2060 )extern struct dvb_frontend *mt2060_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct mt2060_config *cfg,u16 if1);#else static inline struct dvb_frontend *mt2060_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct mt2060_config *cfg,u16 if1)
drivers/media/tuners/mt2063.h +1 -1
@@ -8,7 +8,7 @@ struct mt2063_config {u32 refclock; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_MT2063 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_MT2063 )struct dvb_frontend *mt2063_attach (struct dvb_frontend *fe,struct mt2063_config *config,struct i2c_adapter *i2c);
drivers/media/tuners/mt20xx.h +1 -1
@@ -20,7 +20,7 @@#include <linux/i2c.h> #include "dvb_frontend.h" -#if IS_ENABLED (CONFIG_MEDIA_TUNER_MT20XX ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_MT20XX )extern struct dvb_frontend *microtune_attach (struct dvb_frontend *fe,struct i2c_adapter * i2c_adap,u8 i2c_addr);
drivers/media/tuners/mt2131.h +1 -1
@@ -30,7 +30,7 @@ struct mt2131_config {u8 clock_out;/* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */ }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_MT2131 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_MT2131 ) extern struct dvb_frontend* mt2131_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2131_config *cfg,
drivers/media/tuners/mt2266.h +1 -1
@@ -24,7 +24,7 @@ struct mt2266_config {u8 i2c_address; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_MT2266 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_MT2266 )extern struct dvb_frontend *mt2266_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct mt2266_config *cfg);#else static inline struct dvb_frontend *mt2266_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct mt2266_config *cfg)
drivers/media/tuners/mxl5005s.h +1 -1
@@ -118,7 +118,7 @@ struct mxl5005s_config {u8 AgcMasterByte; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_MXL5005S ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_MXL5005S )extern struct dvb_frontend *mxl5005s_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct mxl5005s_config *config);
drivers/media/tuners/mxl5007t.h +1 -1
@@ -77,7 +77,7 @@ struct mxl5007t_config { unsigned int clk_out_enable:1; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_MXL5007T ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_MXL5007T )extern struct dvb_frontend *mxl5007t_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,u8 addr,struct mxl5007t_config *cfg);
drivers/media/tuners/qt1010.h +1 -1
@@ -36,7 +36,7 @@ struct qt1010_config {* @param cfg tuner hw based configuration * @return fe pointer on success, NULL on failure */ -#if IS_ENABLED (CONFIG_MEDIA_TUNER_QT1010 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_QT1010 )extern struct dvb_frontend *qt1010_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct qt1010_config *cfg);
drivers/media/tuners/r820t.h +1 -1
@@ -42,7 +42,7 @@ struct r820t_config {bool use_predetect; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_R820T ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_R820T )struct dvb_frontend *r820t_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,const struct r820t_config *cfg);
drivers/media/tuners/tda18218.h +1 -1
@@ -30,7 +30,7 @@ struct tda18218_config { u8 loop_through:1; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_TDA18218 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_TDA18218 )extern struct dvb_frontend *tda18218_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct tda18218_config *cfg);#else
drivers/media/tuners/tda18271.h +1 -1
@@ -121,7 +121,7 @@ enum tda18271_mode { TDA18271_DIGITAL, }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_TDA18271 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_TDA18271 )extern struct dvb_frontend *tda18271_attach (struct dvb_frontend *fe,u8 addr,struct i2c_adapter *i2c,struct tda18271_config *cfg);
drivers/media/tuners/tda827x.h +1 -1
@@ -51,7 +51,7 @@ struct tda827x_config* @param cfg optional callback function pointers. * @return FE pointer on success, NULL on failure. */ -#if IS_ENABLED (CONFIG_MEDIA_TUNER_TDA827X ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_TDA827X )extern struct dvb_frontend *tda827x_attach (struct dvb_frontend *fe,int addr,struct i2c_adapter *i2c,struct tda827x_config *cfg);
drivers/media/tuners/tda8290.h +1 -1
@@ -38,7 +38,7 @@ struct tda829x_config {struct tda18271_std_map *tda18271_std_map; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_TDA8290 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_TDA8290 )extern int tda829x_probe (struct i2c_adapter *i2c_adap,u8 i2c_addr); extern struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe,
drivers/media/tuners/tda9887.h +1 -1
@@ -21,7 +21,7 @@#include "dvb_frontend.h" /* ------------------------------------------------------------------------ */ -#if IS_ENABLED (CONFIG_MEDIA_TUNER_TDA9887 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_TDA9887 )extern struct dvb_frontend *tda9887_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c_adap,u8 i2c_addr);
drivers/media/tuners/tea5761.h +1 -1
@@ -20,7 +20,7 @@#include <linux/i2c.h> #include "dvb_frontend.h" -#if IS_ENABLED (CONFIG_MEDIA_TUNER_TEA5761 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_TEA5761 )extern int tea5761_autodetection (struct i2c_adapter * i2c_adap,u8 i2c_addr); extern struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe,
drivers/media/tuners/tea5767.h +1 -1
@@ -39,7 +39,7 @@ struct tea5767_ctrl {enum tea5767_xtal xtal_freq; }; -#if IS_ENABLED (CONFIG_MEDIA_TUNER_TEA5767 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_TEA5767 )extern int tea5767_autodetection (struct i2c_adapter * i2c_adap,u8 i2c_addr); extern struct dvb_frontend *tea5767_attach(struct dvb_frontend *fe,
drivers/media/tuners/tua9001.h +1 -1
@@ -51,7 +51,7 @@ struct tua9001_config {#define TUA9001_CMD_RESETN 1#define TUA9001_CMD_RXEN 2 -#if IS_ENABLED (CONFIG_MEDIA_TUNER_TUA9001 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_TUA9001 )extern struct dvb_frontend *tua9001_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct tua9001_config *cfg);#else
drivers/media/tuners/tuner-simple.h +1 -1
@@ -20,7 +20,7 @@#include <linux/i2c.h> #include "dvb_frontend.h" -#if IS_ENABLED (CONFIG_MEDIA_TUNER_SIMPLE ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_SIMPLE ) extern struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c_adap, u8 i2c_addr,
drivers/media/tuners/tuner-xc2028.h +1 -1
@@ -56,7 +56,7 @@ struct xc2028_config {#define XC2028_RESET_CLK 1#define XC2028_I2C_FLUSH 2 -#if IS_ENABLED (CONFIG_MEDIA_TUNER_XC2028 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_XC2028 )extern struct dvb_frontend *xc2028_attach (struct dvb_frontend *fe,struct xc2028_config *cfg);#else
drivers/media/tuners/xc4000.h +1 -1
@@ -50,7 +50,7 @@ struct xc4000_config {* it's passed back to a bridge during tuner_callback(). */ -#if IS_ENABLED (CONFIG_MEDIA_TUNER_XC4000 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_XC4000 )extern struct dvb_frontend *xc4000_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,struct xc4000_config *cfg);
drivers/media/tuners/xc5000.h +1 -1
@@ -58,7 +58,7 @@ struct xc5000_config {* it's passed back to a bridge during tuner_callback(). */ -#if IS_ENABLED (CONFIG_MEDIA_TUNER_XC5000 ) +#if IS_REACHABLE (CONFIG_MEDIA_TUNER_XC5000 )extern struct dvb_frontend *xc5000_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,const struct xc5000_config *cfg);
include/linux/kconfig.h +9 -0
@@ -43,4 +43,13 @@*/ #define IS_MODULE (option) config_enabled(option##_MODULE) +/* +* IS_REACHABLE(CONFIG_FOO) evaluates to 1 if the currently compiled +* code can call a function defined in code compiled based on CONFIG_FOO. +* This is similar to IS_ENABLED(), but returns false when invoked from +* built-in code when CONFIG_FOO is set to 'm'. +*/ +#define IS_REACHABLE (option) (config_enabled(option) || \ + (config_enabled(option##_MODULE) && config_enabled(MODULE))) +#endif /* __LINUX_KCONFIG_H */
Quoted 5 lines · Arnd Bergmann
In the media drivers, the v4l2 core knows about all submodules and calls into them from a common function. However this cannot work if the modules that get called are loadable and the core is built-in. In that case we get
Quoted 9 lines
drivers/built-in.o: In function `set_type':drivers/media/v4l2-core/tuner-core.c:301: undefined reference totea5767_attach' drivers/media/v4l2-core/tuner-core.c:307: undefined reference totea5761_attach'drivers/media/v4l2-core/tuner-core.c:349: undefined reference totda9887_attach' drivers/media/v4l2-core/tuner-core.c:405: undefined reference toxc4000_attach' [...]
IdeallyKconfigwould be used to avoid the case of a broken dependency, or the code restructured in a way to turn around the dependency, but either way would require much larger changes here.
What can be done without extending kbuild is to accept CONFIG_VIDEO_TUNER=y and CONFIG_MEDIA_TUNER_FOO=m, but build both into the kernel, e.g.
drivers/media/tuners/Kconfig +5 -0
@@ -71,6 +71,11 @@ config MEDIA_TUNER_TEA5767 help Say Y here to include support for the Philips TEA5767 radio tuner. +config MEDIA_TUNER_TEA5767_BUILD + tristate + default VIDEO_TUNER || MEDIA_TUNER_TEA5767 + depends on MEDIA_TUNER_TEA5767!=n + config MEDIA_TUNER_MSI001 tristate "Mirics MSi001" depends on MEDIA_SUPPORT && SPI && VIDEO_V4L2
Actually, I have hard time coming up with a kconfig syntactic sugar to express such dependency. If I understand it correctly, the valid configurations in this case are
MEDIA_TUNER_TEA5767 n m yVIDEO_TUNER n x x x
m x x x y x x
I.e. only VIDEO_TUNER=y and MEDIA_TUNER_TEA5767=m is incorrect, isn't it?
Thanks,
Michal
Quoted 16 lines · On Thursday 19 February 2015 13:11:07 Michal Marek wrote:
Quoted 5 lines · Arnd Bergmann
In the media drivers, the v4l2 core knows about all submodules and calls into them from a common function. However this cannot work if the modules that get called are loadable and the core is built-in. In that case we get
Quoted 9 lines
drivers/built-in.o: In function `set_type':drivers/media/v4l2-core/tuner-core.c:301: undefined reference totea5767_attach' drivers/media/v4l2-core/tuner-core.c:307: undefined reference totea5761_attach'drivers/media/v4l2-core/tuner-core.c:349: undefined reference totda9887_attach' drivers/media/v4l2-core/tuner-core.c:405: undefined reference toxc4000_attach' [...]
IdeallyKconfigwould be used to avoid the case of a broken dependency, or the code restructured in a way to turn around the dependency, but either way would require much larger changes here.
Quoted 3 lines
What can be done without extending kbuild is to accept
CONFIG_VIDEO_TUNER=yandCONFIG_MEDIA_TUNER_FOO=m, but build both into the kernel, e.g.
Right, but
Quoted 6 lines
drivers/media/tuners/Kconfig +0
-0@@ -71,6 +71,11 @@ config MEDIA_TUNER_TEA5767 help
drivers/media/tuners/Kconfig config MEDIA_TUNER_TEA5767 · line 81
Quoted 10 lines
drivers/media/tuners/Kconfig +5
-0Say Y here to include support for the Philips TEA5767 radio tuner. +config MEDIA_TUNER_TEA5767_BUILD + tristate + default VIDEO_TUNER || MEDIA_TUNER_TEA5767 + depends on MEDIA_TUNER_TEA5767!=n + config MEDIA_TUNER_MSI001 tristate "Mirics MSi001" depends on MEDIA_SUPPORT && SPI && VIDEO_V4L2
We'd then have to do the same for each tuner driver that we have in the kernel or that gets added later. My patch was intended to just restore the previous behavior that was accidentally changed as part of a misguided cleanup.
Quoted 11 lines
Actually, I have hard time coming up with a kconfig syntactic sugar to express such dependency. If I understand it correctly, the valid configurations in this case are
MEDIA_TUNER_TEA5767 n m y VIDEO_TUNER n x x x m x x x y x xI.e. only VIDEO_TUNER=y and MEDIA_TUNER_TEA5767=m is incorrect, isn't it?
Yes, I think that is correct. We have similar problems in other areas of the kernel. In theory, we could enforce the VIDEO_TUNER driver to be modular here by adding lots of dependencies to it:
config VIDEO_TUNER
tristate depends on MEDIA_TUNER_TEA5761 || !MEDIA_TUNER_TEA5761 depends on MEDIA_TUNER_TEA5767 || !MEDIA_TUNER_TEA5767 depends on MEDIA_TUNER_MSI001 || !MEDIA_TUNER_MSI001
but that would also soon get out of hand, and we probably need another indirection here too, for each symbol that selects VIDEO_TUNER.
Arnd
Dne 19.2.2015 v 15:53 Arnd Bergmann napsal(a):
Quoted 31 lines · On Thursday 19 February 2015 13:11:07 Michal Marek wrote:
Quoted 16 lines · Arnd Bergmann
Quoted 5 lines
In the media drivers, the v4l2 core knows about all submodules and calls into them from a common function. However this cannot work if the modules that get called are loadable and the core is built-in. In that case we get
Quoted 9 lines
drivers/built-in.o: In function `set_type':drivers/media/v4l2-core/tuner-core.c:301: undefined reference totea5767_attach' drivers/media/v4l2-core/tuner-core.c:307: undefined reference totea5761_attach'drivers/media/v4l2-core/tuner-core.c:349: undefined reference totda9887_attach' drivers/media/v4l2-core/tuner-core.c:405: undefined reference toxc4000_attach' [...]
IdeallyKconfigwould be used to avoid the case of a broken dependency, or the code restructured in a way to turn around the dependency, but either way would require much larger changes here.Quoted 3 lines
What can be done without extending kbuild is to accept
CONFIG_VIDEO_TUNER=yandCONFIG_MEDIA_TUNER_FOO=m, but build both into the kernel, e.g.Right, but
Quoted 8 lines
drivers/media/tuners/Kconfig +0
-0@@ -71,6 +71,11 @@ config MEDIA_TUNER_TEA5767 help Say Y here to include support for the Philips TEA5767 radio tuner.
Quoted 11 lines
drivers/media/tuners/Kconfig config MEDIA_TUNER_TEA5767 · line 81
Quoted 8 lines
drivers/media/tuners/Kconfig +5
-0+config MEDIA_TUNER_TEA5767_BUILD + tristate + default VIDEO_TUNER || MEDIA_TUNER_TEA5767 + depends on MEDIA_TUNER_TEA5767!=n + config MEDIA_TUNER_MSI001 tristate "Mirics MSi001" depends on MEDIA_SUPPORT && SPI && VIDEO_V4L2We'd then have to do the same for each tuner driver that we have in the kernel or that gets added later.
Yes :-(.
Quoted 9 lines
Quoted 9 lines
Actually, I have hard time coming up with a kconfig syntactic sugar to express such dependency. If I understand it correctly, the valid configurations in this case are
MEDIA_TUNER_TEA5767 n m y VIDEO_TUNER n x x x m x x x y x x
Quoted 4 lines
Quoted 2 lines
I.e. only VIDEO_TUNER=y and MEDIA_TUNER_TEA5767=m is incorrect, isn't it?
Yes, I think that is correct.
OK. In this case, a kconfig extension would be really too specific: "if set, set to at least X but only if X is set as well."
Quoted 9 lines
We have similar problems in other areas
of the kernel. In theory, we could enforce theVIDEO_TUNERdriver to be modular here by adding lots of dependencies to it:config
VIDEO_TUNERtristate depends on MEDIA_TUNER_TEA5761 || !MEDIA_TUNER_TEA5761 depends on MEDIA_TUNER_TEA5767 || !MEDIA_TUNER_TEA5767 depends on MEDIA_TUNER_MSI001 || !MEDIA_TUNER_MSI001
Nah, that's even uglier. I suggest to merge your IS_REACHABLE patch.
Michal
Quoted 4 lines · On Thursday 19 February 2015 16:06:18 Michal Marek wrote:
Quoted 4 lines
We have similar problems in other areas
of the kernel. In theory, we could enforce theVIDEO_TUNERdriver to be modular here by adding lots of dependencies to it:
Quoted 8 lines
Quoted 5 lines
config
VIDEO_TUNERtristate depends on MEDIA_TUNER_TEA5761 || !MEDIA_TUNER_TEA5761 depends on MEDIA_TUNER_TEA5767 || !MEDIA_TUNER_TEA5767 depends on MEDIA_TUNER_MSI001 || !MEDIA_TUNER_MSI001Nah, that's even uglier. I suggest to merge your
IS_REACHABLEpatch.
Ok, can I take this as an ack from your side to merge the include/linux/kconfig.h part of the patch through the linux-media tree?
I thought about splitting up the patch into two, but that would just make merging it harder because we'd still have the dependency.
Arnd
Em Fri, 20 Feb 2015 10:29:42 +0100
Arnd Bergmann <[email protected]> escreveu:
Quoted 14 lines · On Thursday 19 February 2015 16:06:18 Michal Marek wrote:
Quoted 4 lines
Quoted 4 lines
We have similar problems in other areas
of the kernel. In theory, we could enforce theVIDEO_TUNERdriver to be modular here by adding lots of dependencies to it:Quoted 8 lines
Quoted 5 lines
config
VIDEO_TUNERtristate depends on MEDIA_TUNER_TEA5761 || !MEDIA_TUNER_TEA5761 depends on MEDIA_TUNER_TEA5767 || !MEDIA_TUNER_TEA5767 depends on MEDIA_TUNER_MSI001 || !MEDIA_TUNER_MSI001Nah, that's even uglier. I suggest to merge your
IS_REACHABLEpatch.
Quoted 6 lines
Ok, can I take this as an ack from your side to merge the
include/linux/kconfig.hpart of the patch through the linux-media tree?I thought about splitting up the patch into two, but that would just make merging it harder because we'd still have the dependency.
It is likely better if I merge at the linux-media tree. This way, we can avoid conflicts with those headers, if this is ok for Marek.
Regards,
Mauro
Quoted 2 lines
Arnd
Michal Marek
Acked-byQuoted 11 lines · Arnd Bergmann
Quoted 10 lines · On Thursday 19 February 2015 16:06:18 Michal Marek wrote:
Quoted 9 lines
We have similar problems in other areas
of the kernel. In theory, we could enforce theVIDEO_TUNERdriver to be modular here by adding lots of dependencies to it:config
VIDEO_TUNERtristate depends on MEDIA_TUNER_TEA5761 || !MEDIA_TUNER_TEA5761 depends on MEDIA_TUNER_TEA5767 || !MEDIA_TUNER_TEA5767 depends on MEDIA_TUNER_MSI001 || !MEDIA_TUNER_MSI001
Quoted 6 lines
Quoted 2 lines
Nah, that's even uglier. I suggest to merge your
IS_REACHABLEpatch.Ok, can I take this as an ack from your side to merge the
include/linux/kconfig.hpart of the patch through the linux-media tree?
Yes. If you want
Quoted 2 lines
I thought about splitting up the patch into two, but that would just make merging it harder because we'd still have the dependency.
Agreed, no need to pedantically split patches just for the sake of it.
Michal