diff mbox series

media: i2c: thp7312: Add dependency on FW_LOADER

Message ID 20240102074518.24968-1-laurent.pinchart@ideasonboard.com (mailing list archive)
State New
Headers show
Series media: i2c: thp7312: Add dependency on FW_LOADER | expand

Commit Message

Laurent Pinchart Jan. 2, 2024, 7:45 a.m. UTC
The thp7312 driver uses the firmware upload API to update the firmware
stored in a flash memory connected to the device. The API is gated by
the CONFIG_FW_UPLOAD option, and is correctly stubbed in
include/linux/firmware.h. As firmware upload is not used in normal
operation, the driver expects to compile and link when CONFIG_FW_UPLOAD
is disabled.

While CONFIG_FW_UPLOAD is a boolean option, whether the firmware upload
code is built in the kernel or provided as a module is controlled
through the tristate CONFIG_FW_LOADER option that CONFIG_FW_UPLOAD
depends on. This results in the following configuration being accepted
by Kconfig, compiling properly, but failing to link:

CONFIG_FW_LOADER=m
CONFIG_FW_UPLOAD=y
CONFIG_VIDEO_THP7312=y

Fix it by adding a dependency on FW_LOADER.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312312134.tnFH0uX1-lkp@intel.com/
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
This is a fix for v6.8.
---
 drivers/media/i2c/Kconfig | 1 +
 1 file changed, 1 insertion(+)


base-commit: 02d4e62ae2452c83e4a3e279b8e4cb4dcbad4b31
diff mbox series

Patch

diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 78a87331686e..ce5494dd8e99 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -673,6 +673,7 @@  menu "Camera ISPs"
 
 config VIDEO_THP7312
 	tristate "THine THP7312 support"
+	depends on FW_LOADER || FW_LOADER=n
 	depends on I2C
 	select MEDIA_CONTROLLER
 	select V4L2_CCI_I2C