media: rc: clean up Kconfig dependencies
authorArnd Bergmann <arnd@arndb.de>
Wed, 21 Apr 2021 13:58:41 +0000 (15:58 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 21 May 2021 13:06:04 +0000 (15:06 +0200)
commit52518e513d6dbb71a9cd8f7a1b83b76fe6f8709c
tree83dcc300cc300aa74cd64acf802810588139e816
parent58c08df5751d823332ccdb49f1d5795479097119
media: rc: clean up Kconfig dependencies

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@arndb.de>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/rc/Kconfig