diff options
| author | Ian Abbott <abbotti@mev.co.uk> | 2014-09-12 12:19:57 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-19 15:39:39 -0700 |
| commit | 062fdcada9858859b4c8a73322c4b0b718c779ff (patch) | |
| tree | ef487180814baa5c9f45c8454e3e128383b922bb /include | |
| parent | fbfd9c8a1782f33d7b67294b2a42587063e61c0c (diff) | |
staging: comedi: addi_apci_3120: simplify setting of devpriv->us_UseDma
`apci3120_auto_attach()` first sets `devpriv->us_UseDma` to 1, then sets
it back to 0 if it fails to allocate the DMA buffer. Since `*devpriv`
is initially zeroed out by `comedi_alloc_devpriv()`, change it to only
set `devpriv->us_UseDma` to 1 if the allocation succeeds. Also, don't
bother explicitly initializing `devpriv->b_DmaDoubleBuffer` to 0 as it
is already zeroed out.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
