diff options
author | Roy Hashimoto <roy.hashimoto@gmail.com> | 2008-03-12 22:55:31 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-03-25 06:26:14 +0100 |
commit | 12cd5b984f825c5448aa4c0df561f8252076fd52 (patch) | |
tree | af7128d25805158416844aa187a62743711e809b /drivers | |
parent | Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/... (diff) | |
download | linux-12cd5b984f825c5448aa4c0df561f8252076fd52.tar.xz linux-12cd5b984f825c5448aa4c0df561f8252076fd52.zip |
USB: fix gadgetfs class request delegation
gadgetfs (drivers/usb/gadget/inode.c) was not delegating all
non-device requests to userspace. This patch makes the handling of
all request cases consistent.
Signed-off-by: Roy Hashimoto <hashimot@alumni.caltech.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 805602a687cb..0a6feafc8d28 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c @@ -1458,7 +1458,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) /* currently one config, two speeds */ case USB_REQ_SET_CONFIGURATION: if (ctrl->bRequestType != 0) - break; + goto unrecognized; if (0 == (u8) w_value) { value = 0; dev->current_config = 0; @@ -1505,7 +1505,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) /* PXA automagically handles this request too */ case USB_REQ_GET_CONFIGURATION: if (ctrl->bRequestType != 0x80) - break; + goto unrecognized; *(u8 *)req->buf = dev->current_config; value = min (w_length, (u16) 1); break; |