From: H Hartley Sweeten Date: Fri, 20 Jun 2014 20:12:37 +0000 (-0700) Subject: staging: comedi: dt282x: convert 'adbits' boardinfo to 'ai_maxdata' X-Git-Tag: omap-for-v3.17/fixes-against-rc2~166^2~1548 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d839495b64d0ec599e1d2cc74ce3705043c2dae4;p=pandora-kernel.git staging: comedi: dt282x: convert 'adbits' boardinfo to 'ai_maxdata' This member of the boardinfo is the number of bits in the analog input data. Convert this member into the subdevice 'maxdata', (1 << board->adbits) - 1, to avoid needing to do the calculation. Use the subdevice 'maxdata' in the driver instead of using the boardinfo and use the comedi_offset_munge() helper to convert the two's complement data to the offset binary form that the comedi core expects. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed