Commit f3bb2376 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller

USB: cdc_subset: only build when one driver is enabled

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f468a729
...@@ -395,6 +395,10 @@ config USB_NET_RNDIS_HOST ...@@ -395,6 +395,10 @@ config USB_NET_RNDIS_HOST
The protocol specification is incomplete, and is controlled by The protocol specification is incomplete, and is controlled by
(and for) Microsoft; it isn't an "Open" ecosystem or market. (and for) Microsoft; it isn't an "Open" ecosystem or market.
config USB_NET_CDC_SUBSET_ENABLE
tristate
depends on USB_NET_CDC_SUBSET
config USB_NET_CDC_SUBSET config USB_NET_CDC_SUBSET
tristate "Simple USB Network Links (CDC Ethernet subset)" tristate "Simple USB Network Links (CDC Ethernet subset)"
depends on USB_USBNET depends on USB_USBNET
...@@ -413,6 +417,7 @@ config USB_NET_CDC_SUBSET ...@@ -413,6 +417,7 @@ config USB_NET_CDC_SUBSET
config USB_ALI_M5632 config USB_ALI_M5632
bool "ALi M5632 based 'USB 2.0 Data Link' cables" bool "ALi M5632 based 'USB 2.0 Data Link' cables"
depends on USB_NET_CDC_SUBSET depends on USB_NET_CDC_SUBSET
select USB_NET_CDC_SUBSET_ENABLE
help help
Choose this option if you're using a host-to-host cable Choose this option if you're using a host-to-host cable
based on this design, which supports USB 2.0 high speed. based on this design, which supports USB 2.0 high speed.
...@@ -420,6 +425,7 @@ config USB_ALI_M5632 ...@@ -420,6 +425,7 @@ config USB_ALI_M5632
config USB_AN2720 config USB_AN2720
bool "AnchorChips 2720 based cables (Xircom PGUNET, ...)" bool "AnchorChips 2720 based cables (Xircom PGUNET, ...)"
depends on USB_NET_CDC_SUBSET depends on USB_NET_CDC_SUBSET
select USB_NET_CDC_SUBSET_ENABLE
help help
Choose this option if you're using a host-to-host cable Choose this option if you're using a host-to-host cable
based on this design. Note that AnchorChips is now a based on this design. Note that AnchorChips is now a
...@@ -428,6 +434,7 @@ config USB_AN2720 ...@@ -428,6 +434,7 @@ config USB_AN2720
config USB_BELKIN config USB_BELKIN
bool "eTEK based host-to-host cables (Advance, Belkin, ...)" bool "eTEK based host-to-host cables (Advance, Belkin, ...)"
depends on USB_NET_CDC_SUBSET depends on USB_NET_CDC_SUBSET
select USB_NET_CDC_SUBSET_ENABLE
default y default y
help help
Choose this option if you're using a host-to-host cable Choose this option if you're using a host-to-host cable
...@@ -437,6 +444,7 @@ config USB_BELKIN ...@@ -437,6 +444,7 @@ config USB_BELKIN
config USB_ARMLINUX config USB_ARMLINUX
bool "Embedded ARM Linux links (iPaq, ...)" bool "Embedded ARM Linux links (iPaq, ...)"
depends on USB_NET_CDC_SUBSET depends on USB_NET_CDC_SUBSET
select USB_NET_CDC_SUBSET_ENABLE
default y default y
help help
Choose this option to support the "usb-eth" networking driver Choose this option to support the "usb-eth" networking driver
...@@ -454,6 +462,7 @@ config USB_ARMLINUX ...@@ -454,6 +462,7 @@ config USB_ARMLINUX
config USB_EPSON2888 config USB_EPSON2888
bool "Epson 2888 based firmware (DEVELOPMENT)" bool "Epson 2888 based firmware (DEVELOPMENT)"
depends on USB_NET_CDC_SUBSET depends on USB_NET_CDC_SUBSET
select USB_NET_CDC_SUBSET_ENABLE
help help
Choose this option to support the usb networking links used Choose this option to support the usb networking links used
by some sample firmware from Epson. by some sample firmware from Epson.
...@@ -461,6 +470,7 @@ config USB_EPSON2888 ...@@ -461,6 +470,7 @@ config USB_EPSON2888
config USB_KC2190 config USB_KC2190
bool "KT Technology KC2190 based cables (InstaNet)" bool "KT Technology KC2190 based cables (InstaNet)"
depends on USB_NET_CDC_SUBSET depends on USB_NET_CDC_SUBSET
select USB_NET_CDC_SUBSET_ENABLE
help help
Choose this option if you're using a host-to-host cable Choose this option if you're using a host-to-host cable
with one of these chips. with one of these chips.
......
...@@ -23,7 +23,7 @@ obj-$(CONFIG_USB_NET_GL620A) += gl620a.o ...@@ -23,7 +23,7 @@ obj-$(CONFIG_USB_NET_GL620A) += gl620a.o
obj-$(CONFIG_USB_NET_NET1080) += net1080.o obj-$(CONFIG_USB_NET_NET1080) += net1080.o
obj-$(CONFIG_USB_NET_PLUSB) += plusb.o obj-$(CONFIG_USB_NET_PLUSB) += plusb.o
obj-$(CONFIG_USB_NET_RNDIS_HOST) += rndis_host.o obj-$(CONFIG_USB_NET_RNDIS_HOST) += rndis_host.o
obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o obj-$(CONFIG_USB_NET_CDC_SUBSET_ENABLE) += cdc_subset.o
obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o
obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o
obj-$(CONFIG_USB_USBNET) += usbnet.o obj-$(CONFIG_USB_USBNET) += usbnet.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment