diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 16:52:52 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 16:52:52 +0400 |
commit | 3cb603284b3d256ae9ae9e65887cee8416bfef15 (patch) | |
tree | a7012e9ca585c4ada1ff8896de326f540b460f80 /drivers/hwmon/pmbus/max34440.c | |
parent | 2355e4290336fcda4b4a799448f745155a000226 (diff) | |
parent | c5794cfac09a585945e1632451900594db19393b (diff) | |
download | linux-3cb603284b3d256ae9ae9e65887cee8416bfef15.tar.xz |
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (26 commits)
hwmon: (w83627ehf) Better fix for negative temperature values
hwmon: (w83627ehf) Uninline is_word_sized
hwmon: (lm75) Document why clones are not detected
hwmon: (w83627ehf) Move fan pins check to a separate function
hwmon: (w83627ehf) Skip reading unused voltage registers
hwmon: (lm75) Add support for Analog Devices ADT75
hwmon: (pmbus_core) Simplify sign extensions
hwmon: (pmbus) Add support for Lineage Power DC-DC converters
hwmon: (pmbus/ltc2978) Add support for LTC3880 to LTC2978 driver
hwmon: (pmbus/ltc2978) Explicit driver for LTC2978
hwmon: (pmbus) Add support for TEMP2 peak attributes
hwmon: AD7314 driver (ported from IIO)
hwmon: (pmbus) Add support for Intersil power management chips
hwmon: (pmbus) Always call _pmbus_read_byte in core driver
hwmon: (pmbus) Replace EINVAL return codes with more appropriate errors
hwmon: (pmbus) Provide more documentation
hwmon/f71882fg: Make the decision wether to register fan attr. per fan
hwmon/f71882fg: Add a f71882fg_create_fan_sysfs_files helper function
hwmon/f71882fg: Make all fan/pwm attr tables 2 dimensional
hwmon: (exynos4_tmu) Remove IRQF_DISABLED
...
Diffstat (limited to 'drivers/hwmon/pmbus/max34440.c')
-rw-r--r-- | drivers/hwmon/pmbus/max34440.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/hwmon/pmbus/max34440.c b/drivers/hwmon/pmbus/max34440.c index fda621d2e458..beaf5a8d9c45 100644 --- a/drivers/hwmon/pmbus/max34440.c +++ b/drivers/hwmon/pmbus/max34440.c @@ -93,12 +93,14 @@ static int max34440_write_word_data(struct i2c_client *client, int page, static int max34440_read_byte_data(struct i2c_client *client, int page, int reg) { - int ret; + int ret = 0; int mfg_status; - ret = pmbus_set_page(client, page); - if (ret < 0) - return ret; + if (page >= 0) { + ret = pmbus_set_page(client, page); + if (ret < 0) + return ret; + } switch (reg) { case PMBUS_STATUS_IOUT: @@ -224,7 +226,8 @@ static int max34440_probe(struct i2c_client *client, static int max34440_remove(struct i2c_client *client) { - return pmbus_do_remove(client); + pmbus_do_remove(client); + return 0; } static const struct i2c_device_id max34440_id[] = { |