Commit a7be58a1 authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

[PATCH] hwmon: it87 use u8 for vrm

VRM values fit in u8 by design now.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 734a12a3
...@@ -213,7 +213,7 @@ struct it87_data { ...@@ -213,7 +213,7 @@ struct it87_data {
u8 sensor; /* Register value */ u8 sensor; /* Register value */
u8 fan_div[3]; /* Register encoding, shifted right */ u8 fan_div[3]; /* Register encoding, shifted right */
u8 vid; /* Register encoding, combined */ u8 vid; /* Register encoding, combined */
int vrm; u8 vrm;
u32 alarms; /* Register encoding, combined */ u32 alarms; /* Register encoding, combined */
u8 fan_main_ctrl; /* Register value */ u8 fan_main_ctrl; /* Register value */
u8 manual_pwm_ctl[3]; /* manual PWM value set by user */ u8 manual_pwm_ctl[3]; /* manual PWM value set by user */
...@@ -669,7 +669,7 @@ static ssize_t ...@@ -669,7 +669,7 @@ static ssize_t
show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf) show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
{ {
struct it87_data *data = it87_update_device(dev); struct it87_data *data = it87_update_device(dev);
return sprintf(buf, "%ld\n", (long) data->vrm); return sprintf(buf, "%u\n", data->vrm);
} }
static ssize_t static ssize_t
store_vrm_reg(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) store_vrm_reg(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
......
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