Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337238
b: refs/heads/master
c: 34ed78e
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent 43b4f48 commit 3ba2bb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 805afd6bd62b2a6050cda8592fa2f9f72abe5a19
refs/heads/master: 34ed78e8f7f7895e21dc3215c05993aa16adddf3
5 changes: 5 additions & 0 deletions trunk/drivers/staging/comedi/drivers/amplc_dio200.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ struct dio200_board {
enum dio200_model model;
enum dio200_layout_idx layout;
unsigned char mainbar;
unsigned char mainshift;
unsigned int mainsize;
};

Expand Down Expand Up @@ -504,8 +505,10 @@ static inline bool is_isa_board(const struct dio200_board *board)
static unsigned char dio200_read8(struct comedi_device *dev,
unsigned int offset)
{
const struct dio200_board *thisboard = comedi_board(dev);
struct dio200_private *devpriv = dev->private;

offset <<= thisboard->mainshift;
if (devpriv->io.regtype == io_regtype)
return inb(devpriv->io.u.iobase + offset);
else
Expand All @@ -518,8 +521,10 @@ static unsigned char dio200_read8(struct comedi_device *dev,
static void dio200_write8(struct comedi_device *dev, unsigned int offset,
unsigned char val)
{
const struct dio200_board *thisboard = comedi_board(dev);
struct dio200_private *devpriv = dev->private;

offset <<= thisboard->mainshift;
if (devpriv->io.regtype == io_regtype)
outb(val, devpriv->io.u.iobase + offset);
else
Expand Down

0 comments on commit 3ba2bb0

Please sign in to comment.