Commit 5e86f128 authored by Erik Rosen's avatar Erik Rosen Committed by Guenter Roeck

hwmon: (pmbus) Allow phase function even if it's not on page

Allow the use of a phase function even if it does not exist on
the associated page.
Signed-off-by: default avatarErik Rosen <erik.rosen@metormote.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent e8e00c83
...@@ -1329,14 +1329,14 @@ static int pmbus_add_sensor_attrs(struct i2c_client *client, ...@@ -1329,14 +1329,14 @@ static int pmbus_add_sensor_attrs(struct i2c_client *client,
pages = paged ? info->pages : 1; pages = paged ? info->pages : 1;
for (page = 0; page < pages; page++) { for (page = 0; page < pages; page++) {
if (!(info->func[page] & attrs->func)) if (info->func[page] & attrs->func) {
continue; ret = pmbus_add_sensor_attrs_one(client, data, info,
ret = pmbus_add_sensor_attrs_one(client, data, info, name, index, page,
name, index, page, 0xff, attrs, paged);
0xff, attrs, paged); if (ret)
if (ret) return ret;
return ret; index++;
index++; }
if (info->phases[page]) { if (info->phases[page]) {
int phase; int phase;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment