From: H Hartley Sweeten Date: Wed, 6 Mar 2013 22:58:28 +0000 (-0700) Subject: staging: comedi: adl_pci8164: simplify (*insn_{read,write}) X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~137^2~676 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6c57d2ed7ac6224ef70cc5d8adaf9ab8996736c;p=pandora-kernel.git staging: comedi: adl_pci8164: simplify (*insn_{read,write}) The (*insn_read) and (*insn_write) functions for all the subdevices in this driver are the same except for the 'offset' that is added to the iobase and channel to read/write a register on the board. Pass the 'offset' in s->private so we can use the same (*insn_read) and (*insn->write) functions for all the subdevices. Also, fix the (*insn_read) and (*insn_write) functions so they work correctly. The comedi core expects them to read/write insn->n data values and then return the number of values used. For aesthetic reasons, add some whitespace to the subdevice init. Remove the dev_info() noise at the end of the attach. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed