Commit a7be58a126d4cd9f0588df23f58796ed996c1835

Authored by Jean Delvare
Committed by Greg Kroah-Hartman
1 parent 734a12a366

[PATCH] hwmon: it87 use u8 for vrm

VRM values fit in u8 by design now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/hwmon/it87.c
... ... @@ -213,7 +213,7 @@
213 213 u8 sensor; /* Register value */
214 214 u8 fan_div[3]; /* Register encoding, shifted right */
215 215 u8 vid; /* Register encoding, combined */
216   - int vrm;
  216 + u8 vrm;
217 217 u32 alarms; /* Register encoding, combined */
218 218 u8 fan_main_ctrl; /* Register value */
219 219 u8 manual_pwm_ctl[3]; /* manual PWM value set by user */
... ... @@ -669,7 +669,7 @@
669 669 show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
670 670 {
671 671 struct it87_data *data = it87_update_device(dev);
672   - return sprintf(buf, "%ld\n", (long) data->vrm);
  672 + return sprintf(buf, "%u\n", data->vrm);
673 673 }
674 674 static ssize_t
675 675 store_vrm_reg(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)