diff options
Diffstat (limited to 'drivers/block/ub.c')
-rw-r--r-- | drivers/block/ub.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 12fb816db7b0..69b7f8e77596 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -391,7 +391,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum); | |||
391 | */ | 391 | */ |
392 | #ifdef CONFIG_USB_LIBUSUAL | 392 | #ifdef CONFIG_USB_LIBUSUAL |
393 | 393 | ||
394 | #define ub_usb_ids storage_usb_ids | 394 | #define ub_usb_ids usb_storage_usb_ids |
395 | #else | 395 | #else |
396 | 396 | ||
397 | static struct usb_device_id ub_usb_ids[] = { | 397 | static struct usb_device_id ub_usb_ids[] = { |
@@ -2146,10 +2146,9 @@ static int ub_get_pipes(struct ub_dev *sc, struct usb_device *dev, | |||
2146 | ep = &altsetting->endpoint[i].desc; | 2146 | ep = &altsetting->endpoint[i].desc; |
2147 | 2147 | ||
2148 | /* Is it a BULK endpoint? */ | 2148 | /* Is it a BULK endpoint? */ |
2149 | if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) | 2149 | if (usb_endpoint_xfer_bulk(ep)) { |
2150 | == USB_ENDPOINT_XFER_BULK) { | ||
2151 | /* BULK in or out? */ | 2150 | /* BULK in or out? */ |
2152 | if (ep->bEndpointAddress & USB_DIR_IN) { | 2151 | if (usb_endpoint_dir_in(ep)) { |
2153 | if (ep_in == NULL) | 2152 | if (ep_in == NULL) |
2154 | ep_in = ep; | 2153 | ep_in = ep; |
2155 | } else { | 2154 | } else { |
@@ -2168,9 +2167,9 @@ static int ub_get_pipes(struct ub_dev *sc, struct usb_device *dev, | |||
2168 | sc->send_ctrl_pipe = usb_sndctrlpipe(dev, 0); | 2167 | sc->send_ctrl_pipe = usb_sndctrlpipe(dev, 0); |
2169 | sc->recv_ctrl_pipe = usb_rcvctrlpipe(dev, 0); | 2168 | sc->recv_ctrl_pipe = usb_rcvctrlpipe(dev, 0); |
2170 | sc->send_bulk_pipe = usb_sndbulkpipe(dev, | 2169 | sc->send_bulk_pipe = usb_sndbulkpipe(dev, |
2171 | ep_out->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); | 2170 | usb_endpoint_num(ep_out)); |
2172 | sc->recv_bulk_pipe = usb_rcvbulkpipe(dev, | 2171 | sc->recv_bulk_pipe = usb_rcvbulkpipe(dev, |
2173 | ep_in->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); | 2172 | usb_endpoint_num(ep_in)); |
2174 | 2173 | ||
2175 | return 0; | 2174 | return 0; |
2176 | } | 2175 | } |