{
int i;
- /* shows the usb subsystem that the driver is down */
- if (usbduxsub_tmp->interface)
- usb_set_intfdata(usbduxsub_tmp->interface, NULL);
-
if (usbduxsub_tmp->urbIn) {
/* force unlink all urbs */
usbdux_ai_stop(usbduxsub_tmp, 1);
static void usbduxsigma_detach(struct comedi_device *dev)
{
+ struct usb_interface *intf = comedi_to_usb_interface(dev);
struct usbduxsigma_private *devpriv = dev->private;
if (!devpriv)
usbdux_ai_stop(devpriv, devpriv->ai_cmd_running);
usbdux_ao_stop(devpriv, devpriv->ao_cmd_running);
+ usb_set_intfdata(intf, NULL);
+
down(&devpriv->sem);
tidy_up(devpriv);
up(&devpriv->sem);