The watchdog subdevice is supported using the addi_watchdog module and
it uses the register defines from addi_tcw.h. The only register define
needed it the iobase offset to the register block.

Remove the unnecessary defines and rename the iobase define.

Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com>
Cc: Ian Abbott <abbo...@mev.co.uk>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 drivers/staging/comedi/drivers/addi_apci_1564.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c 
b/drivers/staging/comedi/drivers/addi_apci_1564.c
index e59af41..0f853b1 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -144,14 +144,7 @@
 #define APCI1564_DO_INT_STATUS_VCC             BIT(0)
 #define APCI1564_DO_IRQ_REG                    0x20
 #define APCI1564_DO_IRQ_INTR                   BIT(0)
-#define APCI1564_WDOG_REG                      0x24
-#define APCI1564_WDOG_RELOAD_REG               0x28
-#define APCI1564_WDOG_TIMEBASE_REG             0x2c
-#define APCI1564_WDOG_CTRL_REG                 0x30
-#define APCI1564_WDOG_STATUS_REG               0x34
-#define APCI1564_WDOG_IRQ_REG                  0x38
-#define APCI1564_WDOG_WARN_TIMEVAL_REG         0x3c
-#define APCI1564_WDOG_WARN_TIMEBASE_REG                0x40
+#define APCI1564_WDOG_IOBASE                   0x24
 
 /*
  * devpriv->timer Register Map (see addi_tcw.h for register/bit defines)
@@ -198,7 +191,7 @@ static int apci1564_reset(struct comedi_device *dev)
        outl(0x0, dev->iobase + APCI1564_DO_INT_CTRL_REG);
 
        /* Reset the watchdog registers */
-       addi_watchdog_reset(dev->iobase + APCI1564_WDOG_REG);
+       addi_watchdog_reset(dev->iobase + APCI1564_WDOG_IOBASE);
 
        /* Reset the timer registers */
        outl(0x0, devpriv->timer + ADDI_TCW_CTRL_REG);
@@ -771,7 +764,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
 
        /* Initialize the watchdog subdevice */
        s = &dev->subdevices[5];
-       ret = addi_watchdog_init(s, dev->iobase + APCI1564_WDOG_REG);
+       ret = addi_watchdog_init(s, dev->iobase + APCI1564_WDOG_IOBASE);
        if (ret)
                return ret;
 
-- 
2.8.2

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to