From 1a02387063fbd32f51c98540499b90acc8b4317f Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 5 Aug 2015 10:44:42 -0700 Subject: [PATCH] staging: comedi: me4000: remove 'board' from me4000_ai_insn_read() The 'board' pointer is only used in this function to verify that the 'chan' is valid for an aref of AREF_DIFF. For differential inputs, the maximum channel is half the subdevice 'n_chan'. Use that instead and remove the 'board' variable. Also, the comedi core does not validate the aref flags. Add a check to ensure that the subdevice actually supports the AREF_DIFF mode. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed