All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-media@vger.kernel.org
Cc: Sakari Ailus <sakari.ailus@iki.fi>,
	Paul Elder <paul.elder@ideasonboard.com>
Subject: [PATCH] media: i2c: thp7312: Add dependency on FW_LOADER
Date: Tue,  2 Jan 2024 09:45:18 +0200	[thread overview]
Message-ID: <20240102074518.24968-1-laurent.pinchart@ideasonboard.com> (raw)

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(+)

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

base-commit: 02d4e62ae2452c83e4a3e279b8e4cb4dcbad4b31
-- 
Regards,

Laurent Pinchart


                 reply	other threads:[~2024-01-02  7:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240102074518.24968-1-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=paul.elder@ideasonboard.com \
    --cc=sakari.ailus@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.