OSDN Git Service

USB: cdc_subset: only build when one driver is enabled
authorArnd Bergmann <arnd@arndb.de>
Wed, 17 Feb 2016 22:25:11 +0000 (23:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:03:47 +0000 (11:03 +0100)
commitaffad7ad16a4a9a4741036c9d90cebf883f0fc68
tree45db65f02f4cfd637c8ea7463eea7153fc010908
parent2d69b722e418dec6b2b60db23a2798233c685244
USB: cdc_subset: only build when one driver is enabled

commit f3bb23764fac042d189129d485d3a9246cb777da upstream.

This avoids a harmless randconfig warning I get when USB_NET_CDC_SUBSET
is enabled, but all of the more specific drivers are not:

drivers/net/usb/cdc_subset.c:241:2: #warning You need to configure some hardware for this driver

The current behavior is clearly intentional, giving a warning when
a user picks a configuration that won't do anything good. The only
reason for even addressing this is that I'm getting close to
eliminating all 'randconfig' warnings on ARM, and this came up
a couple of times.

My workaround is to not even build the module when none of the
configurations are enable.

Alternatively we could simply remove the #warning (nothing wrong
for compile-testing), turn it into a runtime warning, or
change the Kconfig options into a menu to hide CONFIG_USB_NET_CDC_SUBSET.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/Kconfig
drivers/net/usb/Makefile