public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] media: i2c: mt9m114: add CONFIG_COMMON_CLK dependency
@ 2023-12-12 21:18 Arnd Bergmann
  2023-12-13  8:09 ` Sakari Ailus
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2023-12-12 21:18 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Nathan Chancellor, Sakari Ailus,
	Jacopo Mondi, Hans Verkuil, Laurent Pinchart
  Cc: Arnd Bergmann, Nick Desaulniers, Bill Wendling, Justin Stitt,
	Hans de Goede, Tomi Valkeinen, linux-media, linux-kernel, llvm

From: Arnd Bergmann <arnd@arndb.de>

With clang-16, building without COMMON_CLK triggers a range check on
udelay() because of a constant division-by-zero calculation:

ld.lld: error: undefined symbol: __bad_udelay
>>> referenced by mt9m114.c
>>>               drivers/media/i2c/mt9m114.o:(mt9m114_power_on) in archive vmlinux.a

Avoid this by adding a Kconfig dependency that avoids the broken build.

Fixes: 24d756e914fc ("media: i2c: Add driver for onsemi MT9M114 camera sensor")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/i2c/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index aae05142e191..b224c37bfd77 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -228,6 +228,7 @@ config VIDEO_MT9M111
 
 config VIDEO_MT9M114
 	tristate "onsemi MT9M114 sensor support"
+	depends on COMMON_CLK
 	select V4L2_CCI_I2C
 	help
 	  This is a Video4Linux2 sensor-level driver for the onsemi MT9M114
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-13 11:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-12 21:18 [PATCH] media: i2c: mt9m114: add CONFIG_COMMON_CLK dependency Arnd Bergmann
2023-12-13  8:09 ` Sakari Ailus
2023-12-13  8:32   ` Sakari Ailus
2023-12-13  8:39   ` Arnd Bergmann
2023-12-13  9:10     ` Sakari Ailus
2023-12-13  9:58       ` Laurent Pinchart
2023-12-13 11:23         ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox