]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: i2c: video-i2c: fix build errors due to 'imply hwmon'
authorMatt Ranostay <matt.ranostay@konsulko.com>
Tue, 24 Mar 2020 01:07:41 +0000 (02:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:50:03 +0000 (10:50 +0200)
[ Upstream commit 5eb9721a6a11d5950bb46bf1c92b09aa985158e8 ]

Fix build fault when CONFIG_HWMON is a module, and CONFIG_VIDEO_I2C
as builtin. This is due to 'imply hwmon' in the respective Kconfig.

Issue build log:

ld: drivers/media/i2c/video-i2c.o: in function `amg88xx_hwmon_init':
video-i2c.c:(.text+0x2e1): undefined reference to `devm_hwmon_device_register_with_info

Cc: rdunlap@infradead.org
Fixes: 2c3ecae972ee (media: video-i2c: add hwmon support for amg88xx)
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/video-i2c.c

index 078141712c887d326f635f611be057f6b63559ec..0b977e73ceb29d9be9f67156720a9ee289666956 100644 (file)
@@ -255,7 +255,7 @@ static int amg88xx_set_power(struct video_i2c_data *data, bool on)
        return amg88xx_set_power_off(data);
 }
 
-#if IS_ENABLED(CONFIG_HWMON)
+#if IS_REACHABLE(CONFIG_HWMON)
 
 static const u32 amg88xx_temp_config[] = {
        HWMON_T_INPUT,