mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2.6] USB_GADGET depends on USB
@ 2004-03-03 13:57 Jakub Bogusz
  2004-03-03 15:27 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Bogusz @ 2004-03-03 13:57 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

Up to current cset it's possible to select USB_GADGET even if USB is
disabled (causing only compilation errors). This patch adds depends
rules to disallow USB_GADGET if USB is not enabled (similar to those
found in other drivers/usb/*/Kconfig files).


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/
PLD Team        http://www.pld-linux.org/

[-- Attachment #2: linux-usb-gadget-requires-usb.patch --]
[-- Type: text/plain, Size: 485 bytes --]

--- linux-2.6.4-rc1/drivers/usb/gadget/Kconfig.orig	2004-02-27 22:21:00.000000000 +0000
+++ linux-2.6.4-rc1/drivers/usb/gadget/Kconfig	2004-03-03 13:50:01.000000000 +0000
@@ -4,9 +4,11 @@
 #    (b) the gadget driver using it.
 #
 menu "USB Gadget Support"
+	depends on USB
 
 config USB_GADGET
 	tristate "Support for USB Gadgets"
+	depends on USB
 	help
 	   USB is a master/slave protocol, organized with one master
 	   host (such as a PC) controlling up to 127 peripheral devices.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6] USB_GADGET depends on USB
  2004-03-03 13:57 [PATCH 2.6] USB_GADGET depends on USB Jakub Bogusz
@ 2004-03-03 15:27 ` Greg KH
  2004-03-03 15:45   ` Jakub Bogusz
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2004-03-03 15:27 UTC (permalink / raw)
  To: Jakub Bogusz; +Cc: linux-kernel

On Wed, Mar 03, 2004 at 02:57:56PM +0100, Jakub Bogusz wrote:
> Up to current cset it's possible to select USB_GADGET even if USB is
> disabled (causing only compilation errors). This patch adds depends
> rules to disallow USB_GADGET if USB is not enabled (similar to those
> found in other drivers/usb/*/Kconfig files).

But why would you want to do that?  You can have a box with USB gadget
support but not USB "host" support on it just fine.

This patch is not correct, nor needed.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6] USB_GADGET depends on USB
  2004-03-03 15:27 ` Greg KH
@ 2004-03-03 15:45   ` Jakub Bogusz
  2004-03-03 17:19     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Bogusz @ 2004-03-03 15:45 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

On Wed, Mar 03, 2004 at 07:27:40AM -0800, Greg KH wrote:
> On Wed, Mar 03, 2004 at 02:57:56PM +0100, Jakub Bogusz wrote:
> > Up to current cset it's possible to select USB_GADGET even if USB is
> > disabled (causing only compilation errors). This patch adds depends
> > rules to disallow USB_GADGET if USB is not enabled (similar to those
> > found in other drivers/usb/*/Kconfig files).
> 
> But why would you want to do that?  You can have a box with USB gadget
> support but not USB "host" support on it just fine.
> 
> This patch is not correct, nor needed.

Now I know, David Brownell already explained it to me.

It was because make (old)config) asks questions about USB_GADGET,
USB_ETH, USB_FILE_STORAGE, USB_G_SERIAL, USB_ZERO, USB_GADGETFS even on
platforms where no USB peripheral controller is available (like sparc32) -
which make no sense as none of them can be built without any
CONFIG_USB_GADGET_*.
These options could be omitted on such platforms...


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/
PLD Team        http://www.pld-linux.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6] USB_GADGET depends on USB
  2004-03-03 15:45   ` Jakub Bogusz
@ 2004-03-03 17:19     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2004-03-03 17:19 UTC (permalink / raw)
  To: Jakub Bogusz; +Cc: linux-kernel

On Wed, Mar 03, 2004 at 04:45:47PM +0100, Jakub Bogusz wrote:
> On Wed, Mar 03, 2004 at 07:27:40AM -0800, Greg KH wrote:
> > On Wed, Mar 03, 2004 at 02:57:56PM +0100, Jakub Bogusz wrote:
> > > Up to current cset it's possible to select USB_GADGET even if USB is
> > > disabled (causing only compilation errors). This patch adds depends
> > > rules to disallow USB_GADGET if USB is not enabled (similar to those
> > > found in other drivers/usb/*/Kconfig files).
> > 
> > But why would you want to do that?  You can have a box with USB gadget
> > support but not USB "host" support on it just fine.
> > 
> > This patch is not correct, nor needed.
> 
> Now I know, David Brownell already explained it to me.
> 
> It was because make (old)config) asks questions about USB_GADGET,
> USB_ETH, USB_FILE_STORAGE, USB_G_SERIAL, USB_ZERO, USB_GADGETFS even on
> platforms where no USB peripheral controller is available (like sparc32) -
> which make no sense as none of them can be built without any
> CONFIG_USB_GADGET_*.
> These options could be omitted on such platforms...

Hm, does the following patch help this any?  I don't see that it should,
but who knows...

thanks,

greg k-h

# USB Gadget: clean up the Kconfig dependancies a bit more.

diff -Nru a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
--- a/drivers/usb/gadget/Kconfig	Wed Mar  3 09:17:12 2004
+++ b/drivers/usb/gadget/Kconfig	Wed Mar  3 09:17:12 2004
@@ -42,7 +42,7 @@
 
 config USB_GADGET_NET2280
 	boolean "NetChip 2280"
-	depends on PCI
+	depends on USB_GADGET && PCI
 	help
 	   NetChip 2280 is a PCI based USB peripheral controller which
 	   supports both full and high speed USB 2.0 data transfers.  
@@ -62,7 +62,7 @@
 
 config USB_GADGET_PXA2XX
 	boolean "PXA 2xx or IXP 42x"
-	depends on ARCH_PXA || ARCH_IXP425
+	depends on USB_GADGET && (ARCH_PXA || ARCH_IXP425)
 	help
 	   Intel's PXA 2xx series XScale ARM-5TE processors include
 	   an integrated full speed USB 1.1 device controller.  The
@@ -91,7 +91,7 @@
 
 config USB_GADGET_GOKU
 	boolean "Toshiba TC86C001 'Goku-S'"
-	depends on PCI
+	depends on USB_GADGET && PCI
 	help
 	   The Toshiba TC86C001 is a PCI device which includes controllers
 	   for full speed USB devices, IDE, I2C, SIO, plus a USB host (OHCI).
@@ -111,7 +111,7 @@
 # this could be built elsewhere (doesn't yet exist)
 config USB_GADGET_SA1100
 	boolean "SA 1100"
-	depends on ARCH_SA1100
+	depends on USB_GADGET && ARCH_SA1100
 	help
 	   Intel's SA-1100 is an ARM-4 processor with an integrated
 	   full speed USB 1.1 device controller.
@@ -139,7 +139,7 @@
 
 config USB_ZERO
 	tristate "Gadget Zero (DEVELOPMENT)"
-	depends on EXPERIMENTAL
+	depends on USB_GADGET && EXPERIMENTAL
 	help
 	  Gadget Zero is a two-configuration device.  It either sinks and
 	  sources bulk data; or it loops back a configurable number of
@@ -164,7 +164,7 @@
 
 config USB_ETH
 	tristate "Ethernet Gadget"
-	depends on NET
+	depends on USB_GADGET && NET
 	help
 	  This driver implements Ethernet style communication, in either
 	  of two ways:
@@ -192,7 +192,7 @@
 
 config USB_GADGETFS
 	tristate "Gadget Filesystem (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
+	depends on USB_GADGET && EXPERIMENTAL
 	help
 	  This driver provides a filesystem based API that lets user mode
 	  programs implement a single-configuration USB device, including
@@ -206,7 +206,7 @@
 config USB_FILE_STORAGE
 	tristate "File-backed Storage Gadget (DEVELOPMENT)"
 	# we don't support the SA1100 because of its limitations
-	depends on USB_GADGET_SA1100 = n
+	depends on USB_GADGET && USB_GADGET_SA1100 = n
 	help
 	  The File-backed Storage Gadget acts as a USB Mass Storage
 	  disk drive.  As its storage repository it can use a regular
@@ -228,6 +228,7 @@
 
 config USB_G_SERIAL
 	tristate "Serial Gadget"
+	depends on USB_GADGET
 	help
 	  The Serial Gadget talks to the Linux-USB generic serial driver.
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-03 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-03 13:57 [PATCH 2.6] USB_GADGET depends on USB Jakub Bogusz
2004-03-03 15:27 ` Greg KH
2004-03-03 15:45   ` Jakub Bogusz
2004-03-03 17:19     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®