Skip to content
Commit 29947fd6 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: pcmmio: simplify pcmmio_stop_intr()



This function is only called by the interrupt subdevice so the sanity
check of the 'asic' is not necessary. Remove it.

The 'nports' is always 3 and the 'firstport' is always 0. Remove the
for () loop that clears the registers to disable the interrupts and
just use the pcmmio_dio_write() helper to write to the three page
registers.

This also fixes a bug where the write to the page registers is not
protected with the spinlock.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 62957c98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment