diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-07-29 13:48:38 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-31 17:37:44 -0700 |
commit | b0926a7afabe49021f4fbed9baac0419ad3aa56a (patch) | |
tree | 8736d070d531426ae000981cd1b21ec3b716182d /include/trace/events | |
parent | 5589c7cc9f37e929754e0a14b85db7c23a28129f (diff) |
staging: comedi: das16: fix DMA init during board attach
DMA support is optional in this driver. To enable it, the user
passes the desired DMA channel during the board attach. A timer
is then used by the driver to periodically get the analog input
data from the DMA.
Since the DMA support is optional, modify the init code so that
it only fails if the DMA channel is unavailable or the DMA buffers
can not be allocated. Don't fail just because the user passed an
invalid DMA channel (only DMA channels 1 and 3 are valid).
Remove the printk() noise about the DMA. Change the printk() when
the request_dma() fails into a dev_err().
Move the timer initialization so it's only setup if DMA is available.
It's not needed otherwise. Also, only hook up the subdevice command
support functions if DMA is available. This allows removing a couple
sanity checks in the command support.
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>
Diffstat (limited to 'include/trace/events')
0 files changed, 0 insertions, 0 deletions