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

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
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -1329,14 +1329,14 @@ static int pmbus_add_sensor_attrs(struct i2c_client *client,

		pages = paged ? info->pages : 1;
		for (page = 0; page < pages; page++) {
			if (!(info->func[page] & attrs->func))
				continue;
			if (info->func[page] & attrs->func) {
				ret = pmbus_add_sensor_attrs_one(client, data, info,
								 name, index, page,
								 0xff, attrs, paged);
				if (ret)
					return ret;
				index++;
			}
			if (info->phases[page]) {
				int phase;