From: H Hartley Sweeten Date: Mon, 9 Dec 2013 22:31:18 +0000 (-0700) Subject: staging: comedi: pcmmio: tidy up pcmmio_start_intr() X-Git-Tag: v3.14-rc1~150^2~300 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5b970aeb9c19208abeabcb675194d5d6e9cfe68;p=pandora-kernel.git staging: comedi: pcmmio: tidy up pcmmio_start_intr() Refactor the function to remove some indent levels. Use pcmmio_dio_write() to write the polarity and enable paged registers instead of using the for () loop to write each register in the pages. The for () loop actually has a bug. It switches the page to the 'enab' registers for the first port then switches to the 'pol' registers for all remaining writes. It also was not using the pagelock spinlock to protect the writes to the page registers. Using the pcmmio_dio_write() helper ensures that the writes to the paged registers complete correctly. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed