Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363390
b: refs/heads/master
c: 7fd80eb
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Mar 11, 2013
1 parent 0895f57 commit fa88516
Show file tree
Hide file tree
Showing 2 changed files with 5 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: b4a69035fb7ed12f0e869d7c7e448d1bf0bccf4f
refs/heads/master: 7fd80eb0aa4183a2f950f5d34dfcc47812f83371
11 changes: 4 additions & 7 deletions trunk/drivers/staging/comedi/drivers/ni_65xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,6 @@ static const struct ni_65xx_board ni_65xx_boards[] = {
};

#define n_ni_65xx_boards ARRAY_SIZE(ni_65xx_boards)
static inline const struct ni_65xx_board *board(struct comedi_device *dev)
{
return dev->board_ptr;
}

static inline unsigned ni_65xx_port_by_channel(unsigned channel)
{
Expand Down Expand Up @@ -372,6 +368,7 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{
const struct ni_65xx_board *board = comedi_board(dev);
struct ni_65xx_private *devpriv = dev->private;
unsigned base_bitfield_channel;
const unsigned max_ports_per_bitfield = 5;
Expand All @@ -387,7 +384,7 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev,
unsigned base_port_channel;
unsigned port_mask, port_data, port_read_bits;
int bitshift;
if (port >= ni_65xx_total_num_ports(board(dev)))
if (port >= ni_65xx_total_num_ports(board))
break;
base_port_channel = port_offset * ni_65xx_channels_per_port;
port_mask = data[0];
Expand All @@ -410,15 +407,15 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev,
devpriv->output_bits[port] |=
port_data & port_mask;
bits = devpriv->output_bits[port];
if (board(dev)->invert_outputs)
if (board->invert_outputs)
bits = ~bits;
writeb(bits,
devpriv->mite->daq_io_addr +
Port_Data(port));
}
port_read_bits =
readb(devpriv->mite->daq_io_addr + Port_Data(port));
if (s->type == COMEDI_SUBD_DO && board(dev)->invert_outputs) {
if (s->type == COMEDI_SUBD_DO && board->invert_outputs) {
/* Outputs inverted, so invert value read back from
* DO subdevice. (Does not apply to boards with DIO
* subdevice.) */
Expand Down

0 comments on commit fa88516

Please sign in to comment.