media: i2c: mt9m114: use fsleep() in place of udelay()
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 In this configuration, the driver already fails to probe, before this function gets called, so it's enough to suppress the assertion. Do this by using fsleep(), which turns long delays into sleep() calls in place of the link failure. This is probably a good idea regardless to avoid overly long dynamic udelay() calls on a slow clock. Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Fixes: 24d756e9 ("media: i2c: Add driver for onsemi MT9M114 camera sensor") Signed-off-by:Arnd Bergmann <arnd@arndb.de> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl>
Showing
Please register or sign in to comment