diff options
author | Guenter Roeck <linux@roeck-us.net> | 2018-03-10 17:49:47 -0800 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2018-03-10 18:59:47 -0800 |
commit | a46f8cd696624ef757be0311eb28f119c36778e8 (patch) | |
tree | 31362c21751d821522172c166c20d1a268dd5d08 /drivers/hwmon/pmbus/max8688.c | |
parent | 91ab883eb21325ad80f3473633f794c78ac87f51 (diff) | |
download | linux-stable-a46f8cd696624ef757be0311eb28f119c36778e8.tar.gz linux-stable-a46f8cd696624ef757be0311eb28f119c36778e8.tar.bz2 linux-stable-a46f8cd696624ef757be0311eb28f119c36778e8.zip |
hwmon: (pmbus/max8688) Accept negative page register values
A negative page register value means that no page needs to be
selected. This is used by status register evaluations and needs
to be accepted.
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/pmbus/max8688.c')
-rw-r--r-- | drivers/hwmon/pmbus/max8688.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/pmbus/max8688.c b/drivers/hwmon/pmbus/max8688.c index dd4883a19045..e951f9b87abb 100644 --- a/drivers/hwmon/pmbus/max8688.c +++ b/drivers/hwmon/pmbus/max8688.c @@ -45,7 +45,7 @@ static int max8688_read_word_data(struct i2c_client *client, int page, int reg) { int ret; - if (page) + if (page > 0) return -ENXIO; switch (reg) { |