From: Guenter Roeck Date: Tue, 1 Mar 2011 21:49:18 +0000 (-0800) Subject: hwmon: (pmbus) More stringent checking of VOUT_MODE register X-Git-Tag: v2.6.39-rc1~448^2~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83274c68a34094bbb465589e61f91a3714f8d026;p=pandora-kernel.git hwmon: (pmbus) More stringent checking of VOUT_MODE register Some PMBus chips do not support the VOUT_MODE register. To make matters worse, such chips may not return an error when reading the register either, but instead return 0xff. Check if the register exists using pmbus_check_byte_register() before reading its value. In addition, validate the returned value and ignore it if it is 0xff (which is invalid). Reported-by: Greg Schnorr Tested-by: Greg Schnorr Signed-off-by: Guenter Roeck Acked-by: Greg Schnorr --- Reading git-diff-tree failed