Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317095
b: refs/heads/master
c: 0613196
h: refs/heads/master
i:
  317093: 9487a76
  317091: 16c2380
  317087: 9c23e7a
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jun 5, 2012
1 parent 2866227 commit cc1d83e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 75b9ad9e902a51edc90cfcb4dd84c53683554de2
refs/heads/master: 061319698271bc80155cf3a67f0d5afed4024705
15 changes: 8 additions & 7 deletions trunk/drivers/staging/comedi/drivers/dt282x.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,6 @@ struct dt282x_board {
int dabits;
};

#define this_board ((const struct dt282x_board *)dev->board_ptr)

struct dt282x_private {
int ad_2scomp; /* we have 2's comp jumper set */
int da0_2scomp; /* same, for DAC0 */
Expand Down Expand Up @@ -580,6 +578,7 @@ static int dt282x_ai_insn_read(struct comedi_device *dev,
static int dt282x_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{
const struct dt282x_board *board = comedi_board(dev);
int err = 0;
int tmp;

Expand Down Expand Up @@ -658,8 +657,8 @@ static int dt282x_ai_cmdtest(struct comedi_device *dev,
cmd->convert_arg = SLOWEST_TIMER;
err++;
}
if (cmd->convert_arg < this_board->ai_speed) {
cmd->convert_arg = this_board->ai_speed;
if (cmd->convert_arg < board->ai_speed) {
cmd->convert_arg = board->ai_speed;
err++;
}
if (cmd->scan_end_arg != cmd->chanlist_len) {
Expand Down Expand Up @@ -694,6 +693,7 @@ static int dt282x_ai_cmdtest(struct comedi_device *dev,

static int dt282x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
const struct dt282x_board *board = comedi_board(dev);
struct comedi_cmd *cmd = &s->async->cmd;
int timer;

Expand All @@ -706,8 +706,8 @@ static int dt282x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)

dt282x_disable_dma(dev);

if (cmd->convert_arg < this_board->ai_speed)
cmd->convert_arg = this_board->ai_speed;
if (cmd->convert_arg < board->ai_speed)
cmd->convert_arg = board->ai_speed;
timer = dt282x_ns_to_timer(&cmd->convert_arg, TRIG_ROUND_NEAREST);
outw(timer, dev->iobase + DT2821_TMRCTR);

Expand Down Expand Up @@ -1176,12 +1176,13 @@ static int dt282x_grab_dma(struct comedi_device *dev, int dma1, int dma2)
*/
static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
const struct dt282x_board *board = comedi_board(dev);
int i, irq;
int ret;
struct comedi_subdevice *s;
unsigned long iobase;

dev->board_name = this_board->name;
dev->board_name = board->name;

iobase = it->options[opt_iobase];
if (!iobase)
Expand Down

0 comments on commit cc1d83e

Please sign in to comment.