Re: [PATCH 2/2] media: rc: clean up Kconfig dependencies
From: Randy Dunlap
Date: Sat Apr 24 2021 - 02:35:03 EST
On 4/21/21 6:58 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
> I came across a randconfig build failure from one driver
> that only depends on CONFIG_USB_ARCH_HAS_HCD but fails when
> built without CONFIG_USB:
> ld: drivers/media/rc/ir_toy.o: in function `irtoy_disconnect':
> ir_toy.c:(.text+0x24): undefined reference to `usb_kill_urb'
> ld: ir_toy.c:(.text+0x2c): undefined reference to `usb_free_urb'
> ld: ir_toy.c:(.text+0x34): undefined reference to `usb_kill_urb'
> ld: ir_toy.c:(.text+0x3c): undefined reference to `usb_free_urb'
> Upon a closer look, I find that a lot of the other drivers
> 'select USB' rather than stating 'depends on USB' as is common
> for most subsystems. I also find that all except one driver
> have an extra 'depends on RC_CORE' that is already implied by
> the top-level 'if RC_CORE' check.
> Clean up both by reducing the dependencies to the required set.
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> drivers/media/rc/Kconfig | 73 ++++++----------------------------------
> 1 file changed, 11 insertions(+), 62 deletions(-)