From: H Hartley Sweeten Date: Fri, 1 May 2015 21:58:26 +0000 (-0700) Subject: staging: comedi: ni_mio_common: refactor m-series stc register handling X-Git-Tag: omap-for-v4.2/fixes-rc1^2~92^2~760 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05dd0c9fcb34f8335728a2c4ea7f5bb5829900bc;p=pandora-kernel.git staging: comedi: ni_mio_common: refactor m-series stc register handling For M-Series boards (devpriv->is_m_series), the STC registers need to be remapped. This is currently handled with some big switch statements to convert the STC register offset to the M-Series offset. Some of the registers also need special handling due to differences in the register size on the M-Series boards. Create some lookup tables to handle the remapping of the read and write registers. These are easier to maintain and can contain the register size so that a common function can be used instead of the separate helpers. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed