diff options
| author | David Brownell <david-b@pacbell.net> | 2004-01-27 01:27:13 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-01-27 01:27:13 -0800 |
| commit | de0bee2f9c57338fae9a3f46371a6e5a38e9bf23 (patch) | |
| tree | 0e6b661c844050c6dba6236d7f5eff8d6a37a0b4 | |
| parent | 959ab1dc46b4ae87bc7d19b8602c42862542fc04 (diff) | |
[PATCH] USB: fix gadget config
- Fix kconfig botch (bk automerge can be rather flakey)
- The gadgetfs patches going with the kconfig cleanups
| -rw-r--r-- | drivers/usb/gadget/Kconfig | 48 | ||||
| -rw-r--r-- | drivers/usb/gadget/inode.c | 19 |
2 files changed, 14 insertions, 53 deletions
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index b8e574460b10..38e9f6a2a2bf 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -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 diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 96bddf7b525d..8d4a76751411 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c @@ -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; |
