diff mbox series

media: bcm2835-unicam: Depend on COMMON_CLK

Message ID 20240512222104.24646-1-laurent.pinchart@ideasonboard.com (mailing list archive)
State New
Headers show
Series media: bcm2835-unicam: Depend on COMMON_CLK | expand

Commit Message

Laurent Pinchart May 12, 2024, 10:21 p.m. UTC
The bcm2835-unicam driver calls the clk_set_min_rate() function, which
is declared but not implemented on platforms that don't provide
COMMON_CLK. This causes linkage failures with some configurations.

Fix it by depending on COMMON_CLK. This only slightly restricts
compilation testing, but not usage of the driver as all platforms on
which the hardware can be found provide COMMON_CLK.

Fixes: 392cd78d495f ("media: bcm2835-unicam: Add support for CCP2/CSI2 camera interface")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405112243.2MLRT7li-lkp@intel.com/
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/platform/broadcom/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: eba63df7eb1f95df6bfb67722a35372b6994928d

Comments

Dave Stevenson May 13, 2024, 3:40 p.m. UTC | #1
Hi Laurent

On Sun, 12 May 2024 at 23:21, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> The bcm2835-unicam driver calls the clk_set_min_rate() function, which
> is declared but not implemented on platforms that don't provide
> COMMON_CLK. This causes linkage failures with some configurations.
>
> Fix it by depending on COMMON_CLK. This only slightly restricts
> compilation testing, but not usage of the driver as all platforms on
> which the hardware can be found provide COMMON_CLK.
>
> Fixes: 392cd78d495f ("media: bcm2835-unicam: Add support for CCP2/CSI2 camera interface")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202405112243.2MLRT7li-lkp@intel.com/
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I'd looked at that test robot failure this morning.

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

> ---
>  drivers/media/platform/broadcom/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/broadcom/Kconfig b/drivers/media/platform/broadcom/Kconfig
> index cc2c9afcc948..32b76ebfcd9a 100644
> --- a/drivers/media/platform/broadcom/Kconfig
> +++ b/drivers/media/platform/broadcom/Kconfig
> @@ -3,7 +3,7 @@
>  config VIDEO_BCM2835_UNICAM
>         tristate "Broadcom BCM283x/BCM271x Unicam video capture driver"
>         depends on ARCH_BCM2835 || COMPILE_TEST
> -       depends on PM
> +       depends on COMMON_CLK && PM
>         depends on VIDEO_DEV
>         select MEDIA_CONTROLLER
>         select V4L2_FWNODE
>
> base-commit: eba63df7eb1f95df6bfb67722a35372b6994928d
> --
> Regards,
>
> Laurent Pinchart
>
diff mbox series

Patch

diff --git a/drivers/media/platform/broadcom/Kconfig b/drivers/media/platform/broadcom/Kconfig
index cc2c9afcc948..32b76ebfcd9a 100644
--- a/drivers/media/platform/broadcom/Kconfig
+++ b/drivers/media/platform/broadcom/Kconfig
@@ -3,7 +3,7 @@ 
 config VIDEO_BCM2835_UNICAM
 	tristate "Broadcom BCM283x/BCM271x Unicam video capture driver"
 	depends on ARCH_BCM2835 || COMPILE_TEST
-	depends on PM
+	depends on COMMON_CLK && PM
 	depends on VIDEO_DEV
 	select MEDIA_CONTROLLER
 	select V4L2_FWNODE