]> git.hungrycats.org Git - linux/commitdiff
[PATCH] USB: usb gadgetfs, handle omap_udc
authorDavid Brownell <david-b@pacbell.net>
Wed, 14 Jul 2004 07:59:45 +0000 (00:59 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 14 Jul 2004 07:59:45 +0000 (00:59 -0700)
Tell gadgetfs about omap_udc.
Add some missing __user annotations.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/usb/gadget/inode.c

index 1d169b70a94ec1c6bb9c049c40988ff4ee7279dd..343fe52afa3e875731e3ca85e4f529dffc5d90c6 100644 (file)
@@ -253,6 +253,10 @@ static void put_ep (struct ep_data *data)
 #define CHIP                   "goku_udc"
 #endif
 
+#ifdef CONFIG_USB_GADGET_OMAP
+#define CHIP                   "omap_udc"
+#endif
+
 #ifdef CONFIG_USB_GADGET_SA1100
 #define CHIP                   "sa1100"
 #endif
@@ -737,7 +741,7 @@ static struct file_operations ep_io_operations = {
  * speed descriptor, then optional high speed descriptor.
  */
 static ssize_t
-ep_config (struct file *fd, const char *buf, size_t len, loff_t *ptr)
+ep_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
 {
        struct ep_data          *data = fd->private_data;
        struct usb_ep           *ep;
@@ -944,7 +948,7 @@ static int setup_req (struct usb_ep *ep, struct usb_request *req, u16 len)
 }
 
 static ssize_t
-ep0_read (struct file *fd, char *buf, size_t len, loff_t *ptr)
+ep0_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
 {
        struct dev_data                 *dev = fd->private_data;
        ssize_t                         retval;
@@ -1125,7 +1129,7 @@ next_event (struct dev_data *dev, enum usb_gadgetfs_event_type type)
 }
 
 static ssize_t
-ep0_write (struct file *fd, const char *buf, size_t len, loff_t *ptr)
+ep0_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
 {
        struct dev_data         *dev = fd->private_data;
        ssize_t                 retval = -ESRCH;
@@ -1763,7 +1767,7 @@ static int is_valid_config (struct usb_config_descriptor *config)
 }
 
 static ssize_t
-dev_config (struct file *fd, const char *buf, size_t len, loff_t *ptr)
+dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
 {
        struct dev_data         *dev = fd->private_data;
        ssize_t                 value = len, length = len;