From khali@linux-fr.org Sun Dec 18 07:42:39 2005 Date: Sun, 18 Dec 2005 16:40:14 +0100 From: Jean Delvare To: Greg KH Subject: [PATCH 04/11] hwmon: it87 use u8 for vrm Message-Id: <20051218164014.3ecbb76b.khali@linux-fr.org> Content-Disposition: inline; filename=hwmon-it87-vrm-fits-in-u8.patch VRM values fit in u8 by design now. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/it87.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- gregkh-2.6.orig/drivers/hwmon/it87.c +++ gregkh-2.6/drivers/hwmon/it87.c @@ -213,7 +213,7 @@ struct it87_data { u8 sensor; /* Register value */ u8 fan_div[3]; /* Register encoding, shifted right */ u8 vid; /* Register encoding, combined */ - int vrm; + u8 vrm; u32 alarms; /* Register encoding, combined */ u8 fan_main_ctrl; /* Register value */ u8 manual_pwm_ctl[3]; /* manual PWM value set by user */ @@ -669,7 +669,7 @@ static ssize_t show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf) { 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 store_vrm_reg(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)