From: H Hartley Sweeten Date: Mon, 17 Feb 2014 21:27:57 +0000 (-0700) Subject: staging: comedi: pcl818: tidy up pcl818_check() X-Git-Tag: v3.15-rc1~139^2~932 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=243e7146c8ed16cbda71126168fe73acab7c62d2;p=pandora-kernel.git staging: comedi: pcl818: tidy up pcl818_check() This function probes a number of the boards registers during the (*attach) to verify that it is actually a PCL-818 compatible board. For aesthetics, move the function closer to the (*attach). Refactor the function to return an errno if fails. Change the errno from -EIO to -ENODEV and remove the unnecessary comedi_error() noise. Make sure the CONTROL register is reset to a known state after the check. The 0x18 value actually defines an invalid interrupt selection and sets an undefined bit. Add a couple comments to clarify the magic values. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed