]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
hwmon: (ds1621) Clean up register access
authorJean Delvare <khali@linux-fr.org>
Mon, 30 Mar 2009 19:46:40 +0000 (21:46 +0200)
committerJean Delvare <khali@linux-fr.org>
Mon, 30 Mar 2009 19:46:40 +0000 (21:46 +0200)
commit594592dc6f68356a3b7278eb4d260a50a66f0a06
tree0bdb535a8e3bcd0f4ea03fdc86842709e9ea4b50
parent9202add67454c6a6f9508f41e733edce705dc56e
hwmon: (ds1621) Clean up register access

Fix a few oddities in how the ds1621 driver accesses the registers:
* We don't need a wrapper to access the configuration register.
* Check for error before calling swab16. Error checking isn't
  complete yet, but that's a start.
* Device-specific read functions should never be called during
  detection, as by definition we don't know what device we are talking
  to at that point.
* Likewise, don't assume that register reads succeed during detection.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
drivers/hwmon/ds1621.c