From: H Hartley Sweeten Date: Wed, 27 Jun 2012 01:12:15 +0000 (-0700) Subject: staging: comedi: cb_pcidas: cleanup dac08_write() X-Git-Tag: v3.6-rc1~100^2~476 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b436356dcc67a665da07441ab113e9a5652073e5;p=pandora-kernel.git staging: comedi: cb_pcidas: cleanup dac08_write() Reverse the logic of the test against the cached value so that the function only has one exit point. Make the logic of the dac write a bit clearer by create a local variable for the address used in the outw() calls and masking the value to write and setting the enable bits before doing the outw() calls. Add a comment just to make sure it's clear. Also, add a comment about the 'return 1;'. This should be insn->n which is the number of data parameters used to do the dac08_write_insn() but the insn is not a parameter to this function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed