提交 c43e6512 编写于 作者: M Mauro Carvalho Chehab

[media] lgdt3306a: Use IS_ENABLED() for attach function

Simplify the check if CONFIG_DVB_LGDT3306A is enabled, use the
IS_ENABLED() macro, just like the other frontend modules.
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 4937ba94
...@@ -1662,7 +1662,7 @@ static void lgdt3306a_release(struct dvb_frontend *fe) ...@@ -1662,7 +1662,7 @@ static void lgdt3306a_release(struct dvb_frontend *fe)
static struct dvb_frontend_ops lgdt3306a_ops; static struct dvb_frontend_ops lgdt3306a_ops;
struct dvb_frontend *lgdt3306a_attach(const struct lgdt3306a_config *config, struct dvb_frontend *lgdt3306a_attach(const struct lgdt3306a_config *config,
struct i2c_adapter *i2c_adap) struct i2c_adapter *i2c_adap)
{ {
struct lgdt3306a_state *state = NULL; struct lgdt3306a_state *state = NULL;
int ret; int ret;
......
...@@ -63,15 +63,13 @@ struct lgdt3306a_config { ...@@ -63,15 +63,13 @@ struct lgdt3306a_config {
int xtalMHz; int xtalMHz;
}; };
#if defined(CONFIG_DVB_LGDT3306A) || (defined(CONFIG_DVB_LGDT3306A_MODULE) && \ #if IS_ENABLED(CONFIG_DVB_LGDT3306A)
defined(MODULE))
extern
struct dvb_frontend *lgdt3306a_attach(const struct lgdt3306a_config *config, struct dvb_frontend *lgdt3306a_attach(const struct lgdt3306a_config *config,
struct i2c_adapter *i2c_adap); struct i2c_adapter *i2c_adap);
#else #else
static inline static inline
struct dvb_frontend *lgdt3306a_attach(const struct lgdt3306a_config *config, struct dvb_frontend *lgdt3306a_attach(const struct lgdt3306a_config *config,
struct i2c_adapter *i2c_adap) struct i2c_adapter *i2c_adap)
{ {
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL; return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册