]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/image/microtek.c
USB: option: New mobile broadband modems to be supported
[linux-2.6-omap-h63xx.git] / drivers / usb / image / microtek.c
index 91e999c9f680cec92aed6c38fa58698820d3754e..4541dfcea88fa8d294e8c05ba1eccbbaff5bb34b 100644 (file)
@@ -185,7 +185,7 @@ static struct usb_driver mts_usb_driver = {
        printk( KERN_DEBUG MTS_NAME x )
 
 #define MTS_DEBUG_GOT_HERE() \
-       MTS_DEBUG("got to %s:%d (%s)\n", __FILE__, (int)__LINE__, __PRETTY_FUNCTION__ )
+       MTS_DEBUG("got to %s:%d (%s)\n", __FILE__, (int)__LINE__, __func__ )
 #define MTS_DEBUG_INT() \
        do { MTS_DEBUG_GOT_HERE(); \
             MTS_DEBUG("transfer = 0x%x context = 0x%x\n",(int)transfer,(int)context ); \
@@ -350,17 +350,16 @@ static int mts_scsi_abort(struct scsi_cmnd *srb)
 static int mts_scsi_host_reset(struct scsi_cmnd *srb)
 {
        struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]);
-       int result, rc;
+       int result;
 
        MTS_DEBUG_GOT_HERE();
        mts_debug_dump(desc);
 
-       rc = usb_lock_device_for_reset(desc->usb_dev, desc->usb_intf);
-       if (rc < 0)
-               return FAILED;
-       result = usb_reset_device(desc->usb_dev);
-       if (rc)
+       result = usb_lock_device_for_reset(desc->usb_dev, desc->usb_intf);
+       if (result == 0) {
+               result = usb_reset_device(desc->usb_dev);
                usb_unlock_device(desc->usb_dev);
+       }
        return result ? FAILED : SUCCESS;
 }
 
@@ -794,7 +793,6 @@ static int mts_usb_probe(struct usb_interface *intf,
 
        new_desc->usb_dev = dev;
        new_desc->usb_intf = intf;
-       init_MUTEX(&new_desc->lock);
 
        /* endpoints */
        new_desc->ep_out = ep_out;
@@ -819,7 +817,7 @@ static int mts_usb_probe(struct usb_interface *intf,
                goto out_kfree2;
 
        new_desc->host->hostdata[0] = (unsigned long)new_desc;
-       if (scsi_add_host(new_desc->host, NULL)) {
+       if (scsi_add_host(new_desc->host, &dev->dev)) {
                err_retval = -EIO;
                goto out_host_put;
        }