staging: comedi: s626: tidy up freeing of the dma buffers
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 26 Aug 2014 00:55:51 +0000 (17:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 20:26:29 +0000 (13:26 -0700)
commit3757e79559534e722df93e184078a141dc0bcfa7
tree8710cf00899ecf01b86dcc026d73aa8c8574f3a8
parentd558c5967741e6c551883c58441d29f5440a4ab2
staging: comedi: s626: tidy up freeing of the dma buffers

Currently the dma buffers are freed during the detach of the driver using
the function s626_close_dma_b(). The buffers are also freed while the
interrupt handler is still attached. This could result in a race condition.

Refactor the code so that the buffers are freed after the interrupt handler
is released and the PCI device is disabled.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/s626.c