aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/cec/core
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-03-10 09:21:32 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-22 10:24:44 +0100
commit7432376a3f57f2fd99e08437070c5f831315e5aa (patch)
tree67cafcc57bc878cd45270ba02ddf959da90b07b9 /drivers/media/cec/core
parentmedia: media tuner headers: fix kernel-doc warnings (diff)
downloadlinux-dev-7432376a3f57f2fd99e08437070c5f831315e5aa.tar.xz
linux-dev-7432376a3f57f2fd99e08437070c5f831315e5aa.zip
media: cec/core/cec-notifier: use IS_REACHABLE(CONFIG_I2C)
If CONFIG_I2C=m and CONFIG_CEC_CORE=y then of_find_i2c_device_by_node() is not reachable. So use IS_REACHABLE instead of IS_ENABLED. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: a62943c145c1 ("media: cec-notifier: also search for HDMI devices on I2C") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/cec/core')
-rw-r--r--drivers/media/cec/core/cec-notifier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/cec/core/cec-notifier.c b/drivers/media/cec/core/cec-notifier.c
index 00bc00f7491f..389dc664b211 100644
--- a/drivers/media/cec/core/cec-notifier.c
+++ b/drivers/media/cec/core/cec-notifier.c
@@ -226,7 +226,7 @@ struct device *cec_notifier_parse_hdmi_phandle(struct device *dev)
hdmi_pdev = of_find_device_by_node(np);
if (hdmi_pdev)
hdmi_dev = &hdmi_pdev->dev;
-#if IS_ENABLED(CONFIG_I2C)
+#if IS_REACHABLE(CONFIG_I2C)
if (!hdmi_dev) {
struct i2c_client *hdmi_client = of_find_i2c_device_by_node(np);