staging: comedi: pcl812: fix logic error in pcl812_ai_setup_dma()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 26 Jan 2015 21:20:15 +0000 (14:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jan 2015 19:16:18 +0000 (11:16 -0800)
commit 92afc2b229038d7b962ae69de5b07bc6c1cf51bf inroduced a logic error
in the DMA size calculation.

If the 'nsamples' is greater than the 'unread_samples' then DMA needs to
be restarted. The current code checks it agains the 'max_samples'.

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/pcl812.c