From: Hans Verkuil Date: Wed, 10 Mar 2021 08:21:32 +0000 (+0100) Subject: media: cec/core/cec-notifier: use IS_REACHABLE(CONFIG_I2C) X-Git-Tag: accepted/tizen/unified/20230118.172025~7365^2~307 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7432376a3f57f2fd99e08437070c5f831315e5aa;p=platform%2Fkernel%2Flinux-rpi.git 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 Fixes: a62943c145c1 ("media: cec-notifier: also search for HDMI devices on I2C") Reported-by: kernel test robot Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/cec/core/cec-notifier.c b/drivers/media/cec/core/cec-notifier.c index 00bc00f..389dc66 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);