]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] media/cec.h: use IS_REACHABLE instead of IS_ENABLED
authorHans Verkuil <hverkuil@xs4all.nl>
Thu, 8 Jun 2017 18:37:44 +0000 (15:37 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 8 Jun 2017 19:52:28 +0000 (16:52 -0300)
Fix messages like this:

adv7842.c:(.text+0x2edadd): undefined reference to `cec_unregister_adapter'

when CEC_CORE=m but the driver including media/cec.h is built-in. In that case
the static inlines provided in media/cec.h should be used by that driver.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
include/media/cec.h

index bfa88d4d67e1d6663da4952a6a097e32f5e573a8..201f060978da2d5f8f49ad3fb31ac514c55e60c2 100644 (file)
@@ -206,7 +206,7 @@ static inline bool cec_is_sink(const struct cec_adapter *adap)
 #define cec_phys_addr_exp(pa) \
        ((pa) >> 12), ((pa) >> 8) & 0xf, ((pa) >> 4) & 0xf, (pa) & 0xf
 
-#if IS_ENABLED(CONFIG_CEC_CORE)
+#if IS_REACHABLE(CONFIG_CEC_CORE)
 struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
                void *priv, const char *name, u32 caps, u8 available_las);
 int cec_register_adapter(struct cec_adapter *adap, struct device *parent);