Commit 55aab08f authored by Patrick Rudolph's avatar Patrick Rudolph Committed by Guenter Roeck

hwmon: (pmbus_core) Fix pmbus_is_enabled()

Refactor pmbus_is_enabled() to return the status without any additional
processing as it is already done in _pmbus_is_enabled().

Fixes: df5f6b6a ("hwmon: (pmbus/core) Generalise pmbus get status")
Cc: stable@vger.kernel.org # v6.4
Signed-off-by: default avatarPatrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: default avatarNaresh Solanki <Naresh.Solanki@9elements.com>
Link: https://lore.kernel.org/r/20230725125428.3966803-1-Naresh.Solanki@9elements.com
[groeck: Rephrased commit message]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 54685abe
...@@ -2768,7 +2768,7 @@ static int __maybe_unused pmbus_is_enabled(struct device *dev, u8 page) ...@@ -2768,7 +2768,7 @@ static int __maybe_unused pmbus_is_enabled(struct device *dev, u8 page)
ret = _pmbus_is_enabled(dev, page); ret = _pmbus_is_enabled(dev, page);
mutex_unlock(&data->update_lock); mutex_unlock(&data->update_lock);
return !!(ret & PB_OPERATION_CONTROL_ON); return ret;
} }
#define to_dev_attr(_dev_attr) \ #define to_dev_attr(_dev_attr) \
......
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