]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerSasha Levin <alexander.levin@microsoft.com>
Sun, 4 Mar 2018 15:28:30 +0000 (10:28 -0500)
commit9cc7eaba8b5cecac7a73a0ff71574d645203dcc7
tree4756b1c56b6a4c5c8b520241010ecaa7b9aff77c
parent9d287c2eb3ae19086d941145c14c1eb89629d239
USB: cdc_subset: only build when one driver is enabled

[ Upstream commit f3bb23764fac042d189129d485d3a9246cb777da ]

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: Sasha Levin <alexander.levin@microsoft.com>
drivers/net/usb/Kconfig
drivers/net/usb/Makefile