RE: [PATCH 17/23] staging: comedi: addi_apci_2200: use addi_watchdog module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
> Cc: Ian Abbott <abbotti@xxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
>  .../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

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


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux