aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/ub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/ub.c')
-rw-r--r--drivers/block/ub.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 12fb816db7b0..b36b84fbe390 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -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}