summaryrefslogtreecommitdiffstats
path: root/drivers/iio/magnetometer/mag3110.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-02-19 18:11:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-21 21:39:38 +0100
commitc36d44ace681cdbed05d06df736e772a80e20992 (patch)
treefa70bc2e5af3b3b5fcb675ef7df747c561f12c10 /drivers/iio/magnetometer/mag3110.c
parentstaging: comedi: pcl816: remove unnecessary function separation comments (diff)
downloadlinux-c36d44ace681cdbed05d06df736e772a80e20992.tar.xz
linux-c36d44ace681cdbed05d06df736e772a80e20992.zip
staging: comedi: pcl816: tidy up pcl818_check()
This function probes a number of the boards registers during the (*attach) to verify that it is actually a PCL-816 compatible board. For aesthetics, move the function closer to the (*attach). To better match the pcl818 driver, allocate the private data before calling pcl816_check(). Refactor the function to return an errno if fails. Change the errno from -EIO to -ENODEV and remove the unnecessary dev_err() 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 <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/magnetometer/mag3110.c')
0 files changed, 0 insertions, 0 deletions