Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337312
b: refs/heads/master
c: 0014048
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 26, 2012
1 parent 5099702 commit c1839f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 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: d3bf2177c85f15a10c715cb0225311992503e8eb
refs/heads/master: 0014048e091da8bfdbe6f5a15d4045d3747d1335
19 changes: 7 additions & 12 deletions trunk/drivers/staging/comedi/drivers/dt3000.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ static void debug_intr_flags(unsigned int flags)

#define TIMEOUT 100

static int dt3k_send_cmd(struct comedi_device *dev, unsigned int cmd)
static void dt3k_send_cmd(struct comedi_device *dev, unsigned int cmd)
{
struct dt3k_private *devpriv = dev->private;
int i;
Expand All @@ -294,13 +294,10 @@ static int dt3k_send_cmd(struct comedi_device *dev, unsigned int cmd)
break;
udelay(1);
}
if ((status & DT3000_COMPLETION_MASK) == DT3000_NOERROR)
return 0;

dev_dbg(dev->class_dev, "dt3k_send_cmd() timeout/error status=0x%04x\n",
status);

return -ETIME;
if ((status & DT3000_COMPLETION_MASK) != DT3000_NOERROR)
dev_dbg(dev->class_dev, "%s: timeout/error status=0x%04x\n",
__func__, status);
}

static unsigned int dt3k_readsingle(struct comedi_device *dev,
Expand Down Expand Up @@ -365,10 +362,9 @@ static void dt3k_ai_empty_fifo(struct comedi_device *dev,
static int dt3k_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
struct dt3k_private *devpriv = dev->private;
int ret;

writew(SUBS_AI, devpriv->io_addr + DPR_SubSys);
ret = dt3k_send_cmd(dev, CMD_STOP);
dt3k_send_cmd(dev, CMD_STOP);

writew(0, devpriv->io_addr + DPR_Int_Mask);

Expand Down Expand Up @@ -560,7 +556,6 @@ static int dt3k_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
unsigned int chan, range, aref;
unsigned int divider;
unsigned int tscandiv;
int ret;
unsigned int mode;

for (i = 0; i < cmd->chanlist_len; i++) {
Expand Down Expand Up @@ -595,15 +590,15 @@ static int dt3k_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
writew(AI_FIFO_DEPTH / 2, devpriv->io_addr + DPR_Params(7));

writew(SUBS_AI, devpriv->io_addr + DPR_SubSys);
ret = dt3k_send_cmd(dev, CMD_CONFIG);
dt3k_send_cmd(dev, CMD_CONFIG);

writew(DT3000_ADFULL | DT3000_ADSWERR | DT3000_ADHWERR,
devpriv->io_addr + DPR_Int_Mask);

debug_n_ints = 0;

writew(SUBS_AI, devpriv->io_addr + DPR_SubSys);
ret = dt3k_send_cmd(dev, CMD_START);
dt3k_send_cmd(dev, CMD_START);

return 0;
}
Expand Down

0 comments on commit c1839f2

Please sign in to comment.