]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (sht15) Properly handle the case CONFIG_REGULATOR=n
authorJean Delvare <khali@linux-fr.org>
Wed, 14 Apr 2010 14:14:08 +0000 (16:14 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:47:55 +0000 (07:47 -0700)
commitd610bdc6a23398217d9d0c5207cb85676e2a3193
treeffac707b9194cb5f2b6ecf0964253832718ec439
parenteeb5f3b99a8ccc55e4ae4b0511a0b05e86d0b78d
hwmon: (sht15) Properly handle the case CONFIG_REGULATOR=n

commit c7a78d2c2e2537fd24903e966f34aae50319d587 upstream.

When CONFIG_REGULATOR isn't set, regulator_get_voltage() returns 0.
Properly handle this case by not trusting the value.

Reported-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/sht15.c