Commit Graph

3 Commits (master)

Author SHA1 Message Date
Axel Lin a64fe2ed76 MISC: convert drivers/misc/* to use module_i2c_driver()
This patch converts the drivers in drivers/misc/* to use the
module_i2c_driver() macro which makes the code smaller and a bit
simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Michael Hennerich <hennerich@blackfin.uclinux.org>
Cc: Anantha Narayanan <Anantha.Narayanan@intel.com>
Cc: Hemanth V <hemanthv@ti.com>
Cc: Christoph Mair <christoph.mair@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Ben Gardner <bgardner@wabtec.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Kalhan Trisal <kalhan.trisal@intel.com>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Cc: Daniel Mack <zonque@gmail.com>
Cc: Rodolfo Giometti <giometti@linux.it>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 16:31:49 -08:00
Axel Lin 6f7d485e13 drivers/misc/hmc6352.c: fix wrong return value checking for i2c_master_recv()
i2c_master_recv() returns negative errno, or else the number of bytes
read.  Thus i2c_master_recv(client, i2c_data, 2) returns 2 instead of 1 in
success case.

[akpm@linux-foundation.org: make `ret' signed]
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Kalhan Trisal <kalhan.trisal@intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22 17:44:10 -07:00
Kalhan Trisal cfa3b24c38 hmc6352: add driver for the HMC6352 compass
This driver will report the heading values in degrees to the sysfs
interface.  The values returned are headings .  e.g.  245.6

Alan: Cleanups requested now all folded in and a sysfs description to keep
Andrew happy. The sysfs description now resembles hwmon.

Signed-off-by: Kalhan Trisal <kalhan.trisal@intel.com>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-09 20:45:10 -07:00