};
struct vmk80xx_private {
- struct usb_interface *intf;
struct usb_endpoint_descriptor *ep_rx;
struct usb_endpoint_descriptor *ep_tx;
struct firmware_version fw;
struct usb_endpoint_descriptor *ep;
unsigned int pipe;
- if (!devpriv->intf)
- return -ENODEV;
-
if (devpriv->model == VMK8061_MODEL) {
vmk80xx_do_bulk_msg(dev);
return 0;
struct usb_endpoint_descriptor *ep;
unsigned int pipe;
- if (!devpriv->intf)
- return -ENODEV;
-
devpriv->usb_tx_buf[0] = cmd;
if (devpriv->model == VMK8061_MODEL) {
static int vmk80xx_find_usb_endpoints(struct comedi_device *dev)
{
struct vmk80xx_private *devpriv = dev->private;
- struct usb_interface *intf = devpriv->intf;
+ struct usb_interface *intf = comedi_to_usb_interface(dev);
struct usb_host_interface *iface_desc = intf->cur_altsetting;
struct usb_endpoint_descriptor *ep_desc;
int i;
return -ENOMEM;
dev->private = devpriv;
- devpriv->intf = intf;
devpriv->model = boardinfo->model;
ret = vmk80xx_find_usb_endpoints(dev);
static void vmk80xx_detach(struct comedi_device *dev)
{
+ struct usb_interface *intf = comedi_to_usb_interface(dev);
struct vmk80xx_private *devpriv = dev->private;
if (!devpriv)
down(&devpriv->limit_sem);
- usb_set_intfdata(devpriv->intf, NULL);
+ usb_set_intfdata(intf, NULL);
kfree(devpriv->usb_rx_buf);
kfree(devpriv->usb_tx_buf);