diff mbox series

[-next] media: staging: stkwebcam: Fix the build error with stkwebcam

Message ID 20221226094820.1157244-1-cuigaosheng1@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] media: staging: stkwebcam: Fix the build error with stkwebcam | expand

Commit Message

cuigaosheng Dec. 26, 2022, 9:48 a.m. UTC
When I am building the kernel on arm64, set config CONFIG_USB=m &&
CONFIG_VIDEO_STKWEBCAM=y, I get some error reports as follows:
  drivers/staging/media/deprecated/stkwebcam/stk-webcam.o: In
    function `stk_v4l_dev_release':
  stk-webcam.c:(.text+0x3e0): undefined reference to `usb_put_intf'
  stk-webcam.c:(.text+0x3e8): undefined reference to `usb_put_dev'
  drivers/staging/media/deprecated/stkwebcam/stk-webcam.o: In
  function `stk_clean_iso':
  stk-webcam.c:(.text+0xb0c): undefined reference to `usb_kill_urb'
  stk-webcam.c:(.text+0xb14): undefined reference to `usb_free_urb'

Fix it by add dependency option on USB for VIDEO_STKWEBCAM.

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 drivers/staging/media/deprecated/stkwebcam/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Geert Uytterhoeven Jan. 17, 2023, 8:32 p.m. UTC | #1
Hi Gaosheng,

On Mon, Dec 26, 2022 at 10:48 AM Gaosheng Cui <cuigaosheng1@huawei.com> wrote:
> When I am building the kernel on arm64, set config CONFIG_USB=m &&
> CONFIG_VIDEO_STKWEBCAM=y, I get some error reports as follows:
>   drivers/staging/media/deprecated/stkwebcam/stk-webcam.o: In
>     function `stk_v4l_dev_release':
>   stk-webcam.c:(.text+0x3e0): undefined reference to `usb_put_intf'
>   stk-webcam.c:(.text+0x3e8): undefined reference to `usb_put_dev'
>   drivers/staging/media/deprecated/stkwebcam/stk-webcam.o: In
>   function `stk_clean_iso':
>   stk-webcam.c:(.text+0xb0c): undefined reference to `usb_kill_urb'
>   stk-webcam.c:(.text+0xb14): undefined reference to `usb_free_urb'
>
> Fix it by add dependency option on USB for VIDEO_STKWEBCAM.
>
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>

Thanks for your patch!

> --- a/drivers/staging/media/deprecated/stkwebcam/Kconfig
> +++ b/drivers/staging/media/deprecated/stkwebcam/Kconfig
> @@ -2,7 +2,7 @@
>  config VIDEO_STKWEBCAM
>         tristate "USB Syntek DC1125 Camera support (DEPRECATED)"
>         depends on VIDEO_DEV
> -       depends on MEDIA_USB_SUPPORT && MEDIA_CAMERA_SUPPORT
> +       depends on USB && MEDIA_USB_SUPPORT && MEDIA_CAMERA_SUPPORT
>         help
>           Say Y here if you want to use this type of camera.
>           Supported devices are typically found in some Asus laptops,

I think Arnd's patch[1] is better, as it also fixes the modular
MEDIA_SUPPORT case.

[1] "[PATCH] staging: media: stkwebcam: add USB dependency"
    https://lore.kernel.org/all/20230117165851.2300111-1-arnd@kernel.org
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Hans Verkuil Jan. 23, 2023, 12:37 p.m. UTC | #2
FYI: for v6.3 the whole driver will be removed, so I'm dropping this patch.

Regards,

	Hans

On 26/12/2022 10:48, Gaosheng Cui wrote:
> When I am building the kernel on arm64, set config CONFIG_USB=m &&
> CONFIG_VIDEO_STKWEBCAM=y, I get some error reports as follows:
>   drivers/staging/media/deprecated/stkwebcam/stk-webcam.o: In
>     function `stk_v4l_dev_release':
>   stk-webcam.c:(.text+0x3e0): undefined reference to `usb_put_intf'
>   stk-webcam.c:(.text+0x3e8): undefined reference to `usb_put_dev'
>   drivers/staging/media/deprecated/stkwebcam/stk-webcam.o: In
>   function `stk_clean_iso':
>   stk-webcam.c:(.text+0xb0c): undefined reference to `usb_kill_urb'
>   stk-webcam.c:(.text+0xb14): undefined reference to `usb_free_urb'
> 
> Fix it by add dependency option on USB for VIDEO_STKWEBCAM.
> 
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> ---
>  drivers/staging/media/deprecated/stkwebcam/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/deprecated/stkwebcam/Kconfig b/drivers/staging/media/deprecated/stkwebcam/Kconfig
> index 7234498e634a..083fadab232d 100644
> --- a/drivers/staging/media/deprecated/stkwebcam/Kconfig
> +++ b/drivers/staging/media/deprecated/stkwebcam/Kconfig
> @@ -2,7 +2,7 @@
>  config VIDEO_STKWEBCAM
>  	tristate "USB Syntek DC1125 Camera support (DEPRECATED)"
>  	depends on VIDEO_DEV
> -	depends on MEDIA_USB_SUPPORT && MEDIA_CAMERA_SUPPORT
> +	depends on USB && MEDIA_USB_SUPPORT && MEDIA_CAMERA_SUPPORT
>  	help
>  	  Say Y here if you want to use this type of camera.
>  	  Supported devices are typically found in some Asus laptops,
diff mbox series

Patch

diff --git a/drivers/staging/media/deprecated/stkwebcam/Kconfig b/drivers/staging/media/deprecated/stkwebcam/Kconfig
index 7234498e634a..083fadab232d 100644
--- a/drivers/staging/media/deprecated/stkwebcam/Kconfig
+++ b/drivers/staging/media/deprecated/stkwebcam/Kconfig
@@ -2,7 +2,7 @@ 
 config VIDEO_STKWEBCAM
 	tristate "USB Syntek DC1125 Camera support (DEPRECATED)"
 	depends on VIDEO_DEV
-	depends on MEDIA_USB_SUPPORT && MEDIA_CAMERA_SUPPORT
+	depends on USB && MEDIA_USB_SUPPORT && MEDIA_CAMERA_SUPPORT
 	help
 	  Say Y here if you want to use this type of camera.
 	  Supported devices are typically found in some Asus laptops,