Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354502
b: refs/heads/master
c: e8f311a
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Feb 15, 2013
1 parent 99654fc commit 1b85147
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 36 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0cbfc8269b980adafa7b529bb529a2fc316c5405
refs/heads/master: e8f311a5b6b9163f6aeba2524eaab92dc3b0fb6f
44 changes: 9 additions & 35 deletions trunk/drivers/staging/comedi/drivers/vmk80xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,41 +277,6 @@ static void vmk80xx_read_eeprom(struct vmk80xx_private *devpriv, int flag)
strncpy(devpriv->fw.ic6_vers, rx + 25, 24);
}

static int vmk80xx_reset_device(struct vmk80xx_private *devpriv)
{
struct usb_device *usb = devpriv->usb;
unsigned char *tx_buf = devpriv->usb_tx_buf;
struct urb *urb;
unsigned int tx_pipe;
int ival;
size_t size;

urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb)
return -ENOMEM;

tx_pipe = usb_sndintpipe(usb, 0x01);

ival = devpriv->ep_tx->bInterval;
size = le16_to_cpu(devpriv->ep_tx->wMaxPacketSize);

tx_buf[0] = VMK8055_CMD_RST;
tx_buf[1] = 0x00;
tx_buf[2] = 0x00;
tx_buf[3] = 0x00;
tx_buf[4] = 0x00;
tx_buf[5] = 0x00;
tx_buf[6] = 0x00;
tx_buf[7] = 0x00;

usb_fill_int_urb(urb, usb, tx_pipe, tx_buf, size,
vmk80xx_tx_callback, devpriv, ival);

usb_anchor_urb(urb, &devpriv->tx_anchor);

return usb_submit_urb(urb, GFP_KERNEL);
}

static void vmk80xx_build_int_urb(struct urb *urb, int flag)
{
struct vmk80xx_private *devpriv = urb->context;
Expand Down Expand Up @@ -468,6 +433,15 @@ static int vmk80xx_write_packet(struct vmk80xx_private *devpriv, int cmd)
return retval;
}

static int vmk80xx_reset_device(struct vmk80xx_private *devpriv)
{
size_t size;

size = le16_to_cpu(devpriv->ep_tx->wMaxPacketSize);
memset(devpriv->usb_tx_buf, 0, size);
return vmk80xx_write_packet(devpriv, VMK8055_CMD_RST);
}

#define DIR_IN 1
#define DIR_OUT 2

Expand Down

0 comments on commit 1b85147

Please sign in to comment.