Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-drm-fsl-dcu.git] / drivers / isdn / gigaset / usb-gigaset.c
index bfb73fd5077e85aa148a48dbbf5165f5185c5c19..5ebf49ac9b2302b89abc26a2fe99c83cb523c398 100644 (file)
@@ -41,7 +41,6 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode");
 #define GIGASET_MINORS     1
 #define GIGASET_MINOR      8
 #define GIGASET_MODULENAME "usb_gigaset"
-#define GIGASET_DEVFSNAME  "gig/usb/"
 #define GIGASET_DEVNAME    "ttyGU"
 
 #define IF_WRITEBUF 2000 //FIXME  // WAKEUP_CHARS: 256
@@ -363,7 +362,7 @@ static void gigaset_modem_fill(unsigned long data)
  *
  *     It is called if the data was received from the device.
  */
-static void gigaset_read_int_callback(struct urb *urb, struct pt_regs *regs)
+static void gigaset_read_int_callback(struct urb *urb)
 {
        struct inbuf_t *inbuf = urb->context;
        struct cardstate *cs = inbuf->cs;
@@ -421,7 +420,7 @@ static void gigaset_read_int_callback(struct urb *urb, struct pt_regs *regs)
 
 
 /* This callback routine is called when data was transmitted to the device. */
-static void gigaset_write_bulk_callback(struct urb *urb, struct pt_regs *regs)
+static void gigaset_write_bulk_callback(struct urb *urb)
 {
        struct cardstate *cs = urb->context;
        unsigned long flags;
@@ -710,8 +709,8 @@ static int gigaset_probe(struct usb_interface *interface,
        retval = -ENODEV; //FIXME
 
        /* See if the device offered us matches what we can accept */
-       if ((le16_to_cpu(udev->descriptor.idVendor  != USB_M105_VENDOR_ID)) ||
-           (le16_to_cpu(udev->descriptor.idProduct != USB_M105_PRODUCT_ID)))
+       if ((le16_to_cpu(udev->descriptor.idVendor)  != USB_M105_VENDOR_ID) ||
+           (le16_to_cpu(udev->descriptor.idProduct) != USB_M105_PRODUCT_ID))
                return -ENODEV;
 
        /* this starts to become ascii art... */
@@ -816,14 +815,11 @@ static int gigaset_probe(struct usb_interface *interface,
        return 0;
 
 error:
-       if (ucs->read_urb)
-               usb_kill_urb(ucs->read_urb);
+       usb_kill_urb(ucs->read_urb);
        kfree(ucs->bulk_out_buffer);
-       if (ucs->bulk_out_urb != NULL)
-               usb_free_urb(ucs->bulk_out_urb);
+       usb_free_urb(ucs->bulk_out_urb);
        kfree(cs->inbuf[0].rcvbuf);
-       if (ucs->read_urb != NULL)
-               usb_free_urb(ucs->read_urb);
+       usb_free_urb(ucs->read_urb);
        usb_set_intfdata(interface, NULL);
        ucs->read_urb = ucs->bulk_out_urb = NULL;
        cs->inbuf[0].rcvbuf = ucs->bulk_out_buffer = NULL;
@@ -851,11 +847,9 @@ static void gigaset_disconnect(struct usb_interface *interface)
        usb_kill_urb(ucs->bulk_out_urb);        /* FIXME: only if active? */
 
        kfree(ucs->bulk_out_buffer);
-       if (ucs->bulk_out_urb != NULL)
-               usb_free_urb(ucs->bulk_out_urb);
+       usb_free_urb(ucs->bulk_out_urb);
        kfree(cs->inbuf[0].rcvbuf);
-       if (ucs->read_urb != NULL)
-               usb_free_urb(ucs->read_urb);
+       usb_free_urb(ucs->read_urb);
        ucs->read_urb = ucs->bulk_out_urb = NULL;
        cs->inbuf[0].rcvbuf = ucs->bulk_out_buffer = NULL;
 
@@ -896,8 +890,7 @@ static int __init usb_gigaset_init(void)
        /* allocate memory for our driver state and intialize it */
        if ((driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS,
                                       GIGASET_MODULENAME, GIGASET_DEVNAME,
-                                      GIGASET_DEVFSNAME, &ops,
-                                      THIS_MODULE)) == NULL)
+                                      &ops, THIS_MODULE)) == NULL)
                goto error;
 
        /* allocate memory for our device state and intialize it */