patch-2.3.18 linux/drivers/usb/uss720.c

Next file: linux/drivers/video/Config.in
Previous file: linux/drivers/usb/usb_scsi_debug.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.17/linux/drivers/usb/uss720.c linux/drivers/usb/uss720.c
@@ -48,6 +48,7 @@
 struct parport_uss720_private {
 	struct usb_device *usbdev;
 	void *irqhandle;
+	unsigned int irqpipe;
         unsigned char reg[7];  /* USB registers */
 };
 
@@ -616,8 +617,15 @@
         endpoint = &interface->endpoint[2];
 	printk(KERN_DEBUG "uss720: epaddr %d interval %d\n", endpoint->bEndpointAddress, endpoint->bInterval);
 #if 0
-        priv->irqhandle = usb_request_irq(usbdev, usb_rcvctrlpipe(usbdev, endpoint->bEndpointAddress),
-					  uss720_irq, endpoint->bInterval, pp);
+	priv->irqpipe = usb_rcvctrlpipe(usbdev, endpoint->bEndpointAddress);
+	i = usb_request_irq(usbdev, priv->irqpipe,
+				  uss720_irq, endpoint->bInterval,
+				  pp, &priv->irqhandle);
+	if (i) {
+		printk (KERN_WARNING "usb-uss720: usb_request_irq failed (0x%x)\n", i);
+		/* FIXME: undo some stuff and free some memory. */
+		return -1;
+	}
 #endif
         parport_proc_register(pp);
         parport_announce_port(pp);
@@ -632,7 +640,7 @@
 	struct parport_uss720_private *priv = pp->private_data;
 
 #if 0
-	usb_release_irq(usbdev, priv->irqhandle);
+	usb_release_irq(usbdev, priv->irqhandle, priv->irqpipe);
 #endif
         usbdev->private = NULL;
         priv->usbdev = NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)