Skip to content

Commit

Permalink
staging: comedi: addi_watchdog: all i/o registers are 32-bit
Browse files Browse the repository at this point in the history
All the i/o registers used by the watchdog device on the addi-data
boards are 32-bit. Make sure all the i/o commands use outl/inl to
access the registers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 25, 2013
1 parent 1445ea1 commit c0cd2da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/comedi/drivers/addi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static int addi_watchdog_insn_config(struct comedi_device *dev,
case INSN_CONFIG_ARM:
spriv->wdog_ctrl = ADDI_WDOG_CTRL_ENABLE;
reload = data[1] & s->maxdata;
outw(reload, spriv->iobase + ADDI_WDOG_RELOAD_REG);
outl(reload, spriv->iobase + ADDI_WDOG_RELOAD_REG);

/* Time base is 20ms, let the user know the timeout */
dev_info(dev->class_dev, "watchdog enabled, timeout:%dms\n",
Expand All @@ -78,7 +78,7 @@ static int addi_watchdog_insn_config(struct comedi_device *dev,
return -EINVAL;
}

outw(spriv->wdog_ctrl, spriv->iobase + ADDI_WDOG_CTRL_REG);
outl(spriv->wdog_ctrl, spriv->iobase + ADDI_WDOG_CTRL_REG);

return insn->n;
}
Expand Down Expand Up @@ -112,7 +112,7 @@ static int addi_watchdog_insn_write(struct comedi_device *dev,

/* "ping" the watchdog */
for (i = 0; i < insn->n; i++) {
outw(spriv->wdog_ctrl | ADDI_WDOG_CTRL_SW_TRIG,
outl(spriv->wdog_ctrl | ADDI_WDOG_CTRL_SW_TRIG,
spriv->iobase + ADDI_WDOG_CTRL_REG);
}

Expand Down

0 comments on commit c0cd2da

Please sign in to comment.