[PATCH 17/23] staging: comedi: addi_apci_2200: use addi_watchdog module
H Hartley Sweeten
hartleys at visionengravers.com
Wed Jan 16 01:16:00 UTC 2013
On Tuesday, January 15, 2013 5:45 PM, H Hartley Sweeten wrote:
> The current watchdog support in hwdrv_apci2200.c does not conform
> to the comedi core API.
>
> Use the addi_watchdog module to provide support for the watchdog
> subdevice and remove the now unneeded hwdrv_apci2200.c file.
>
> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
> Cc: Ian Abbott <abbotti at mev.co.uk>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> ---
> .../comedi/drivers/addi-data/hwdrv_apci2200.c | 176 ---------------------
> drivers/staging/comedi/drivers/addi_apci_2200.c | 36 ++---
> 2 files changed, 9 insertions(+), 203 deletions(-)
> delete mode 100644 drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c
Ugh... Just spotted two issues with this patch.
1) The 'select COMEDI_ADDI_WATCHDOG' is missing in the Kconfig to
make sure the addi_watchdog module is built when this driver is selected.
<snip>
> @@ -143,21 +135,9 @@ static int apci2200_auto_attach(struct comedi_device *dev,
>
> /* Allocate and Initialise Timer Subdevice Structures */
> s = &dev->subdevices[4];
<snip>
> + ret = addi_watchdog_init(s, dev->iobase + APCI2200_WDOG_REG);
> + if (ret)
> + return ret;
>
> /* Allocate and Initialise TTL */
> s = &dev->subdevices[5];
> @@ -180,6 +160,8 @@ static void apci2200_detach(struct comedi_device *dev)
> if (dev->iobase)
> apci2200_reset(dev);
> }
> + if (dev->subdevices)
> + addi_watchdog_cleanup(&dev->subdevices[1]);
2) The wrong subdevice is being passed to addi_watchdog_cleanup().
I'll repost this series and fix this after any comments are made.
Regards,
Hartley
More information about the devel
mailing list