static int dt9812_read_info(struct comedi_device *dev,
int offset, void *buf, size_t buf_size)
{
- struct usb_interface *intf = comedi_to_usb_interface(dev);
- struct usb_device *usb = interface_to_usbdev(intf);
+ struct usb_device *usb = comedi_to_usb_dev(dev);
struct dt9812_private *devpriv = dev->private;
struct dt9812_usb_cmd cmd;
int count, ret;
int reg_count, u8 *address,
u8 *value)
{
- struct usb_interface *intf = comedi_to_usb_interface(dev);
- struct usb_device *usb = interface_to_usbdev(intf);
+ struct usb_device *usb = comedi_to_usb_dev(dev);
struct dt9812_private *devpriv = dev->private;
struct dt9812_usb_cmd cmd;
int i, count, ret;
int reg_count, u8 *address,
u8 *value)
{
- struct usb_interface *intf = comedi_to_usb_interface(dev);
- struct usb_device *usb = interface_to_usbdev(intf);
+ struct usb_device *usb = comedi_to_usb_dev(dev);
struct dt9812_private *devpriv = dev->private;
struct dt9812_usb_cmd cmd;
int i, count;
int reg_count,
struct dt9812_rmw_byte *rmw)
{
- struct usb_interface *intf = comedi_to_usb_interface(dev);
- struct usb_device *usb = interface_to_usbdev(intf);
+ struct usb_device *usb = comedi_to_usb_dev(dev);
struct dt9812_private *devpriv = dev->private;
struct dt9812_usb_cmd cmd;
int i, count;
static int dt9812_reset_device(struct comedi_device *dev)
{
- struct usb_interface *intf = comedi_to_usb_interface(dev);
- struct usb_device *usb = interface_to_usbdev(intf);
+ struct usb_device *usb = comedi_to_usb_dev(dev);
struct dt9812_private *devpriv = dev->private;
u32 serial;
u16 vendor;