]> git.hungrycats.org Git - linux/commitdiff
[PATCH] USB: fix gadget config
authorDavid Brownell <david-b@pacbell.net>
Tue, 27 Jan 2004 09:27:13 +0000 (01:27 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 27 Jan 2004 09:27:13 +0000 (01:27 -0800)
  - Fix kconfig botch (bk automerge can be rather flakey)
  - The gadgetfs patches going with the kconfig cleanups

drivers/usb/gadget/Kconfig
drivers/usb/gadget/inode.c

index b8e574460b10518ce09418df2e7f8894004d19fd..38e9f6a2a2bf0e4023362f27ead7dd90019d59f8 100644 (file)
@@ -124,33 +124,6 @@ config USB_SA1100
        depends on USB_GADGET_SA1100
        default USB_GADGET
 
-config USB_GADGET_DUMMY_HCD
-       boolean "Dummy HCD (DEVELOPMENT)"
-       depends on USB
-       help
-         This host controller driver emulates USB, looping all data transfer
-         requests back to a USB "gadget driver" in the same host.  The host
-         side is the master; the gadget side is the slave.  Gadget drivers
-         can be high, full, or low speed; and they have access to endpoints
-         like those from NET2280, PXA2xx, or SA1100 hardware.
-         
-         This may help in some stages of creating a driver to embed in a
-         Linux device, since it lets you debug several parts of the gadget
-         driver without its hardware or drivers being involved.
-         
-         Since such a gadget side driver needs to interoperate with a host
-         side Linux-USB device driver, this may help to debug both sides
-         of a USB protocol stack.
-
-         Say "y" to link the driver statically, or "m" to build a
-         dynamically linked module called "dummy_hcd" and force all
-         gadget drivers to also be dynamically linked.
-
-config USB_DUMMY_HCD
-       tristate
-       depends on USB_GADGET_DUMMY_HCD
-       default USB_GADGET
-
 endchoice
 
 
@@ -268,27 +241,6 @@ config USB_G_SERIAL
 
 # - none yet
 
-config USB_G_SERIAL
-       tristate "serial Gadget"
-       depends on USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA2XX || USB_SA1100)
-
-config USB_G_SERIAL_NET2280
-       bool
-       # for now, treat the "dummy" hcd as if it were a net2280
-       depends on USB_G_SERIAL && (USB_NET2280 || USB_DUMMY_HCD)
-       default y
-
-config USB_G_SERIAL_PXA2XX
-       bool
-       depends on USB_G_SERIAL && USB_PXA2XX
-       default y
-
-config USB_G_SERIAL_SA1100
-       bool
-       depends on USB_G_SERIAL && USB_SA1100
-       default y
-
-
 endchoice
 
 endmenu
index 96bddf7b525de3c230c95f7e7527832912c6865c..8d4a76751411e8d3adfee6e845a57cc3698807a2 100644 (file)
@@ -232,18 +232,27 @@ static void put_ep (struct ep_data *data)
  * the usb controller exposes.
  */
 
-#ifdef CONFIG_USB_GADGETFS_NET2280
+#ifdef CONFIG_USB_GADGET_DUMMY_HCD
+/* act (mostly) like a net2280 */
+#define CONFIG_USB_GADGET_NET2280
+#endif
+
+#ifdef CONFIG_USB_GADGET_NET2280
 #define CHIP                   "net2280"
 #define HIGHSPEED
 #endif
 
-#ifdef CONFIG_USB_GADGETFS_PXA2XX
+#ifdef CONFIG_USB_GADGET_PXA2XX
 #define CHIP                   "pxa2xx_udc"
 /* earlier hardware doesn't have UDCCFR, races set_{config,interface} */
 #warning works best with pxa255 or newer
 #endif
 
-#ifdef CONFIG_USB_GADGETFS_SA1100
+#ifdef CONFIG_USB_GADGET_GOKU
+#define CHIP                   "goku_udc"
+#endif
+
+#ifdef CONFIG_USB_GADGET_SA1100
 #define CHIP                   "sa1100"
 #endif
 
@@ -397,7 +406,7 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
 
 /* handle a synchronous OUT bulk/intr/iso transfer */
 static ssize_t
-ep_read (struct file *fd, char *buf, size_t len, loff_t *ptr)
+ep_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
 {
        struct ep_data          *data = fd->private_data;
        void                    *kbuf;
@@ -441,7 +450,7 @@ free1:
 
 /* handle a synchronous IN bulk/intr/iso transfer */
 static ssize_t
-ep_write (struct file *fd, const char *buf, size_t len, loff_t *ptr)
+ep_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
 {
        struct ep_data          *data = fd->private_data;
        void                    *kbuf;