diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-03-07 00:00:26 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-03-11 08:11:18 +0100 |
commit | 948273764855552e0190dddd701afc1074edca45 (patch) | |
tree | d0013114e77cd9f4456e5e01bd5f5edc58e2da26 /drivers/usb/storage/usb.c | |
parent | e38ddc727264e814c2fbe625f6f2d7953312324e (diff) | |
download | barebox-948273764855552e0190dddd701afc1074edca45.tar.gz barebox-948273764855552e0190dddd701afc1074edca45.tar.xz |
usb: storage: Drop unused fields in struct us_data
Only bulk-only transport is supported by the currennt codebase, so
ep_bInterval and recv_intr_ep are not really used. Remove them and all
related code. While at it remove flags and subclass as well since they
are not really used anywhere in the codebase.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb/storage/usb.c')
-rw-r--r-- | drivers/usb/storage/usb.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 849bce510d..c04a202bbe 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -433,7 +433,6 @@ static int get_pipes(struct us_data *us, struct usb_interface *intf) struct usb_endpoint_descriptor *ep; struct usb_endpoint_descriptor *ep_in = NULL; struct usb_endpoint_descriptor *ep_out = NULL; - struct usb_endpoint_descriptor *ep_int = NULL; /* * Find the first endpoint of each type we need. @@ -454,12 +453,8 @@ static int get_pipes(struct us_data *us, struct usb_interface *intf) ep_out = ep; } } - else if (USB_EP_IS_INT_IN(ep)) { - if (!ep_int) - ep_int = ep; - } } - if (!ep_in || !ep_out || (us->protocol == US_PR_CBI && !ep_int)) { + if (!ep_in || !ep_out || us->protocol == US_PR_CBI) { dev_dbg(dev, "Endpoint sanity check failed! Rejecting dev.\n"); return -EIO; } @@ -467,10 +462,7 @@ static int get_pipes(struct us_data *us, struct usb_interface *intf) /* Store the pipe values */ us->send_bulk_ep = USB_EP_NUM(ep_out); us->recv_bulk_ep = USB_EP_NUM(ep_in); - if (ep_int) { - us->recv_intr_ep = USB_EP_NUM(ep_int); - us->ep_bInterval = ep_int->bInterval; - } + return 0; } @@ -533,9 +525,7 @@ static int usb_stor_probe(struct usb_device *usbdev, /* initialize the us_data structure */ us->pusb_dev = usbdev; - us->flags = 0; us->ifnum = intf->desc.bInterfaceNumber; - us->subclass = intf->desc.bInterfaceSubClass; us->protocol = intf->desc.bInterfaceProtocol; INIT_LIST_HEAD(&us->blk_dev_list); |