staging: comedi: usbduxfast: remove 'ifnum' from private data
The interface number is only needed 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
7c346c2ce8
commit
01245e7a9f
1 changed files with 2 additions and 3 deletions
|
@ -152,7 +152,6 @@ struct usbduxfast_private {
|
||||||
struct urb *urbIn; /* BULK-transfer handling: urb */
|
struct urb *urbIn; /* BULK-transfer handling: urb */
|
||||||
int8_t *transfer_buffer;
|
int8_t *transfer_buffer;
|
||||||
int16_t *insnBuffer; /* input buffer for single insn */
|
int16_t *insnBuffer; /* input buffer for single insn */
|
||||||
int ifnum; /* interface number */
|
|
||||||
struct usb_interface *intf; /* interface structure */
|
struct usb_interface *intf; /* interface structure */
|
||||||
/* comedi device for the interrupt context */
|
/* comedi device for the interrupt context */
|
||||||
struct comedi_device *comedidev;
|
struct comedi_device *comedidev;
|
||||||
|
@ -1285,7 +1284,6 @@ static int usbduxfast_auto_attach(struct comedi_device *dev,
|
||||||
devpriv->comedidev = dev;
|
devpriv->comedidev = dev;
|
||||||
devpriv->usb = usb;
|
devpriv->usb = usb;
|
||||||
devpriv->intf = intf;
|
devpriv->intf = intf;
|
||||||
devpriv->ifnum = intf->altsetting->desc.bInterfaceNumber;
|
|
||||||
usb_set_intfdata(intf, devpriv);
|
usb_set_intfdata(intf, devpriv);
|
||||||
|
|
||||||
devpriv->dux_commands = kmalloc(SIZEOFDUXBUFFER, GFP_KERNEL);
|
devpriv->dux_commands = kmalloc(SIZEOFDUXBUFFER, GFP_KERNEL);
|
||||||
|
@ -1296,7 +1294,8 @@ static int usbduxfast_auto_attach(struct comedi_device *dev,
|
||||||
if (!devpriv->insnBuffer)
|
if (!devpriv->insnBuffer)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = usb_set_interface(devpriv->usb, devpriv->ifnum, 1);
|
ret = usb_set_interface(devpriv->usb,
|
||||||
|
intf->altsetting->desc.bInterfaceNumber, 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(&intf->dev,
|
dev_err(&intf->dev,
|
||||||
"could not switch to alternate setting 1\n");
|
"could not switch to alternate setting 1\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue