]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/ub.c
OMAP2xxx clock: fix broken cpu_mask code
[linux-2.6-omap-h63xx.git] / drivers / block / ub.c
index 048d71d244d7335d3e719e916632ef1a71079465..69b7f8e77596eefa60d4e60bafb04391f0148510 100644 (file)
@@ -391,7 +391,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum);
  */
 #ifdef CONFIG_USB_LIBUSUAL
 
-#define ub_usb_ids  storage_usb_ids
+#define ub_usb_ids  usb_storage_usb_ids
 #else
 
 static struct usb_device_id ub_usb_ids[] = {
@@ -1579,7 +1579,7 @@ static void ub_reset_task(struct work_struct *work)
        struct ub_dev *sc = container_of(work, struct ub_dev, reset_work);
        unsigned long flags;
        struct ub_lun *lun;
-       int lkr, rc;
+       int rc;
 
        if (!sc->reset) {
                printk(KERN_WARNING "%s: Running reset unrequested\n",
@@ -1597,10 +1597,11 @@ static void ub_reset_task(struct work_struct *work)
        } else if (sc->dev->actconfig->desc.bNumInterfaces != 1) {
                ;
        } else {
-               if ((lkr = usb_lock_device_for_reset(sc->dev, sc->intf)) < 0) {
+               rc = usb_lock_device_for_reset(sc->dev, sc->intf);
+               if (rc < 0) {
                        printk(KERN_NOTICE
                            "%s: usb_lock_device_for_reset failed (%d)\n",
-                           sc->name, lkr);
+                           sc->name, rc);
                } else {
                        rc = usb_reset_device(sc->dev);
                        if (rc < 0) {
@@ -1608,9 +1609,7 @@ static void ub_reset_task(struct work_struct *work)
                                    "usb_lock_device_for_reset failed (%d)\n",
                                    sc->name, rc);
                        }
-
-                       if (lkr)
-                               usb_unlock_device(sc->dev);
+                       usb_unlock_device(sc->dev);
                }
        }
 
@@ -2147,10 +2146,9 @@ static int ub_get_pipes(struct ub_dev *sc, struct usb_device *dev,
                ep = &altsetting->endpoint[i].desc;
 
                /* Is it a BULK endpoint? */
-               if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
-                               == USB_ENDPOINT_XFER_BULK) {
+               if (usb_endpoint_xfer_bulk(ep)) {
                        /* BULK in or out? */
-                       if (ep->bEndpointAddress & USB_DIR_IN) {
+                       if (usb_endpoint_dir_in(ep)) {
                                if (ep_in == NULL)
                                        ep_in = ep;
                        } else {
@@ -2169,9 +2167,9 @@ static int ub_get_pipes(struct ub_dev *sc, struct usb_device *dev,
        sc->send_ctrl_pipe = usb_sndctrlpipe(dev, 0);
        sc->recv_ctrl_pipe = usb_rcvctrlpipe(dev, 0);
        sc->send_bulk_pipe = usb_sndbulkpipe(dev,
-               ep_out->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+               usb_endpoint_num(ep_out));
        sc->recv_bulk_pipe = usb_rcvbulkpipe(dev, 
-               ep_in->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+               usb_endpoint_num(ep_in));
 
        return 0;
 }