staging: comedi: usbdux: remove 'ifnum' from the private data
The 'ifnum' is only used during the attach of the device. Remove it from the private data. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0b20d613af
commit
903f4fde80
1 changed files with 2 additions and 4 deletions
|
@ -223,8 +223,6 @@ struct usbdux_private {
|
||||||
int16_t *insn_buffer;
|
int16_t *insn_buffer;
|
||||||
/* output buffer for single DA outputs */
|
/* output buffer for single DA outputs */
|
||||||
int16_t *out_buffer;
|
int16_t *out_buffer;
|
||||||
/* interface number */
|
|
||||||
int ifnum;
|
|
||||||
/* is it USB_SPEED_HIGH or not? */
|
/* is it USB_SPEED_HIGH or not? */
|
||||||
short int high_speed;
|
short int high_speed;
|
||||||
/* asynchronous command is running */
|
/* asynchronous command is running */
|
||||||
|
@ -1896,7 +1894,6 @@ static int usbdux_auto_attach(struct comedi_device *dev,
|
||||||
|
|
||||||
sema_init(&devpriv->sem, 1);
|
sema_init(&devpriv->sem, 1);
|
||||||
|
|
||||||
devpriv->ifnum = intf->altsetting->desc.bInterfaceNumber;
|
|
||||||
usb_set_intfdata(intf, devpriv);
|
usb_set_intfdata(intf, devpriv);
|
||||||
|
|
||||||
devpriv->high_speed = (usb->speed == USB_SPEED_HIGH);
|
devpriv->high_speed = (usb->speed == USB_SPEED_HIGH);
|
||||||
|
@ -1914,7 +1911,8 @@ static int usbdux_auto_attach(struct comedi_device *dev,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* setting to alternate setting 3: enabling iso ep and bulk ep. */
|
/* setting to alternate setting 3: enabling iso ep and bulk ep. */
|
||||||
ret = usb_set_interface(usb, devpriv->ifnum, 3);
|
ret = usb_set_interface(usb, intf->altsetting->desc.bInterfaceNumber,
|
||||||
|
3);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(dev->class_dev,
|
dev_err(dev->class_dev,
|
||||||
"could not set alternate setting 3 in high speed\n");
|
"could not set alternate setting 3 in high speed\n");
|
||||||
|
|
Loading…
Reference in a new issue