Skip to contentSkip to conversation

staging: media: stkwebcam: add USB dependency

PATCH In review Arnd Bergmann 2 participants 2 messages Jan 17, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: media: stkwebcam: add USB dependency

From: Arnd Bergmann <[email protected]>

Before the move, this driver had implicit dependencies on both CONFIG_USB and MEDIA_SUPPORT, which can be =m even in combination with CONFIG_MEDIA_USB_SUPPORT=y, so without the dependency we get a link failure when USB is a loadable module but stkwebcam is built-in:

arm-linux-gnueabi-ld: drivers/staging/media/deprecated/stkwebcam/stk-webcam.o: in function `stk_camera_probe':
stk-webcam.c:(.text+0xcbc): undefined reference to `usb_get_dev'
arm-linux-gnueabi-ld: stk-webcam.c:(.text+0xccc): undefined reference to `usb_get_intf'
arm-linux-gnueabi-ld: stk-webcam.c:(.text+0xd68): undefined reference to `usb_put_intf'
arm-linux-gnueabi-ld: stk-webcam.c:(.text+0xd70): undefined reference to `usb_put_dev'
arm-linux-gnueabi-ld: drivers/staging/media/deprecated/stkwebcam/stk-webcam.o: in function `stk_prepare_iso':
stk-webcam.c:(.text+0xfcc): undefined reference to `usb_free_urb'
arm-linux-gnueabi-ld: stk-webcam.c:(.text+0x1010): undefined reference to `usb_alloc_urb'
arm-linux-gnueabi-ld: stk-webcam.c:(.text+0x10d8): undefined reference to `usb_kill_urb'

Add back the original dependency.

Fixes 1943fb1e50d1 ("media: staging/media: add a STAGING_MEDIA_DEPRECATED option")
---
 drivers/staging/media/deprecated/stkwebcam/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/media/deprecated/stkwebcam/Kconfig +1 -0
index 7234498e634a..e4ebee3c628a 100644
@@ -3,6 +3,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_SUPPORT
 	help
 	  Say Y here if you want to use this type of camera.
 	  Supported devices are typically found in some Asus laptops,
Signature · 1 line
2.39.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Before the move, this driver had implicit dependencies on both CONFIG_USB and MEDIA_SUPPORT, which can be =m even in combination with CONFIG_MEDIA_USB_SUPPORT=y, so without the dependency we get a link failure when USB is a loadable module but stkwebcam is built-in:

arm-linux-gnueabi-ld: drivers/staging/media/deprecated/stkwebcam/stk-webcam.o: in function `stk_camera_probe':
stk-webcam.c:(.text+0xcbc): undefined reference to `usb_get_dev'
arm-linux-gnueabi-ld: stk-webcam.c:(.text+0xccc): undefined reference to `usb_get_intf'
arm-linux-gnueabi-ld: stk-webcam.c:(.text+0xd68): undefined reference to `usb_put_intf'
arm-linux-gnueabi-ld: stk-webcam.c:(.text+0xd70): undefined reference to `usb_put_dev'
arm-linux-gnueabi-ld: drivers/staging/media/deprecated/stkwebcam/stk-webcam.o: in function `stk_prepare_iso':
stk-webcam.c:(.text+0xfcc): undefined reference to `usb_free_urb'
arm-linux-gnueabi-ld: stk-webcam.c:(.text+0x1010): undefined reference to `usb_alloc_urb'
arm-linux-gnueabi-ld: stk-webcam.c:(.text+0x10d8): undefined reference to `usb_kill_urb'

Quoted 4 lines

Add back the original dependency.

Fixes 1943fb1e50d1 ("media: staging/media: add a STAGING_MEDIA_DEPRECATED option")

Yeah, those pesky tristate->bool->tristate dependency chains...

drivers/staging/media/deprecated/stkwebcam/Kconfig config VIDEO_STKWEBCAM · line 9

Quoted 10 lines
drivers/staging/media/deprecated/stkwebcam/Kconfig +1 -0
@@ -3,6 +3,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_SUPPORT
        help
          Say Y here if you want to use this type of camera.
          Supported devices are typically found in some Asus laptops,

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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