diff options
author | Roy Hashimoto <roy.hashimoto@gmail.com> | 2008-03-12 17:55:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-03-25 01:26:14 -0400 |
commit | 12cd5b984f825c5448aa4c0df561f8252076fd52 (patch) | |
tree | af7128d25805158416844aa187a62743711e809b | |
parent | 7c12c92fba4bd985ed6d909e5537468b268dcaa4 (diff) |
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>
-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) | |||
1458 | /* currently one config, two speeds */ | 1458 | /* currently one config, two speeds */ |
1459 | case USB_REQ_SET_CONFIGURATION: | 1459 | case USB_REQ_SET_CONFIGURATION: |
1460 | if (ctrl->bRequestType != 0) | 1460 | if (ctrl->bRequestType != 0) |
1461 | break; | 1461 | goto unrecognized; |
1462 | if (0 == (u8) w_value) { | 1462 | if (0 == (u8) w_value) { |
1463 | value = 0; | 1463 | value = 0; |
1464 | dev->current_config = 0; | 1464 | dev->current_config = 0; |
@@ -1505,7 +1505,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) | |||
1505 | /* PXA automagically handles this request too */ | 1505 | /* PXA automagically handles this request too */ |
1506 | case USB_REQ_GET_CONFIGURATION: | 1506 | case USB_REQ_GET_CONFIGURATION: |
1507 | if (ctrl->bRequestType != 0x80) | 1507 | if (ctrl->bRequestType != 0x80) |
1508 | break; | 1508 | goto unrecognized; |
1509 | *(u8 *)req->buf = dev->current_config; | 1509 | *(u8 *)req->buf = dev->current_config; |
1510 | value = min (w_length, (u16) 1); | 1510 | value = min (w_length, (u16) 1); |
1511 | break; | 1511 | break; |