diff options
author | Guenter Roeck <linux@roeck-us.net> | 2018-03-10 17:55:47 -0800 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2018-03-10 18:59:56 -0800 |
commit | ecb29abd4cb0670c616fb563a078f25d777ce530 (patch) | |
tree | 0836748776b25d7e8c188685c30110054402eadd /drivers/hwmon | |
parent | a46f8cd696624ef757be0311eb28f119c36778e8 (diff) | |
download | talos-obmc-linux-ecb29abd4cb0670c616fb563a078f25d777ce530.tar.gz talos-obmc-linux-ecb29abd4cb0670c616fb563a078f25d777ce530.zip |
hwmon: (pmbus/adm1275) Accept negative page register values
A negative page register value means that no page needs to be
selected. This is used by status register read operations and needs
to be accepted. The failure to do so so results in missed status
and limit registers.
Fixes: da8e48ab483e1 ("hwmon: (pmbus) Always call _pmbus_read_byte in core driver")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/pmbus/adm1275.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c index 00d6995af4c2..8a44e94d5679 100644 --- a/drivers/hwmon/pmbus/adm1275.c +++ b/drivers/hwmon/pmbus/adm1275.c @@ -154,7 +154,7 @@ static int adm1275_read_word_data(struct i2c_client *client, int page, int reg) const struct adm1275_data *data = to_adm1275_data(info); int ret = 0; - if (page) + if (page > 0) return -ENXIO; switch (reg) { @@ -240,7 +240,7 @@ static int adm1275_write_word_data(struct i2c_client *client, int page, int reg, const struct adm1275_data *data = to_adm1275_data(info); int ret; - if (page) + if (page > 0) return -ENXIO; switch (reg) { |