Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] media/cec.h: use IS_REACHABLE instead of IS_ENABLED

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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
f9f314f3 b94aac64

+1 -1
+1 -1
include/media/cec.h
··· 206 206 #define cec_phys_addr_exp(pa) \ 207 207 ((pa) >> 12), ((pa) >> 8) & 0xf, ((pa) >> 4) & 0xf, (pa) & 0xf 208 208 209 - #if IS_ENABLED(CONFIG_CEC_CORE) 209 + #if IS_REACHABLE(CONFIG_CEC_CORE) 210 210 struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, 211 211 void *priv, const char *name, u32 caps, u8 available_las); 212 212 int cec_register_adapter(struct cec_adapter *adap, struct device *parent);