Commit 137beb77 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: usbduxsigma: move usb_set_intfdata(intf, NULL) to (*detach)

For aesthetic reasons, move the clearing of the interface data to
the (*detach) since its set in the (*auto_attach).
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1fc56e86
...@@ -1521,10 +1521,6 @@ static void tidy_up(struct usbduxsigma_private *usbduxsub_tmp) ...@@ -1521,10 +1521,6 @@ static void tidy_up(struct usbduxsigma_private *usbduxsub_tmp)
{ {
int i; 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) { if (usbduxsub_tmp->urbIn) {
/* force unlink all urbs */ /* force unlink all urbs */
usbdux_ai_stop(usbduxsub_tmp, 1); usbdux_ai_stop(usbduxsub_tmp, 1);
...@@ -1847,6 +1843,7 @@ static int usbduxsigma_auto_attach(struct comedi_device *dev, ...@@ -1847,6 +1843,7 @@ static int usbduxsigma_auto_attach(struct comedi_device *dev,
static void usbduxsigma_detach(struct comedi_device *dev) static void usbduxsigma_detach(struct comedi_device *dev)
{ {
struct usb_interface *intf = comedi_to_usb_interface(dev);
struct usbduxsigma_private *devpriv = dev->private; struct usbduxsigma_private *devpriv = dev->private;
if (!devpriv) if (!devpriv)
...@@ -1856,6 +1853,8 @@ static void usbduxsigma_detach(struct comedi_device *dev) ...@@ -1856,6 +1853,8 @@ static void usbduxsigma_detach(struct comedi_device *dev)
usbdux_ai_stop(devpriv, devpriv->ai_cmd_running); usbdux_ai_stop(devpriv, devpriv->ai_cmd_running);
usbdux_ao_stop(devpriv, devpriv->ao_cmd_running); usbdux_ao_stop(devpriv, devpriv->ao_cmd_running);
usb_set_intfdata(intf, NULL);
down(&devpriv->sem); down(&devpriv->sem);
tidy_up(devpriv); tidy_up(devpriv);
up(&devpriv->sem); up(&devpriv->sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment