Convert w83781d i2c chip driver to milli Celsius

Jan Dittmer (j.dittmer@portrix.net)
Fri, 11 Jul 2003 10:33:29 +0200


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-26951-1057912676-0001-2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Convert w83781d i2c chip driver to milli Celsius.
Tested on MSI nForce2 Mainboard.

Jan

-- 
Linux rubicon 2.5.74-mm3-jd2 #1 SMP Wed Jul 9 09:38:20 CEST 2003 i686

--=_courier-26951-1057912676-0001-2 Content-Type: text/plain; name="i2c.w83781d.temp"; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="i2c.w83781d.temp"

--- linux-mm/drivers/i2c/chips/w83781d.c 2003-07-03 15:17:37.000000000 +0200 +++ 2.5.73-mm3/drivers/i2c/chips/w83781d.c 2003-07-10 13:43:49.000000000 +0200 @@ -496,13 +496,13 @@ if (nr >= 2) { /* TEMP2 and TEMP3 */ \ if (data->type == as99127f) { \ return sprintf(buf,"%ld\n", \ - (long)AS99127_TEMP_ADD_FROM_REG(data->reg##_add[nr-2])); \ + (long)AS99127_TEMP_ADD_FROM_REG(data->reg##_add[nr-2])*10); \ } else { \ return sprintf(buf,"%ld\n", \ - (long)TEMP_ADD_FROM_REG(data->reg##_add[nr-2])); \ + (long)TEMP_ADD_FROM_REG(data->reg##_add[nr-2])*10); \ } \ } else { /* TEMP1 */ \ - return sprintf(buf,"%ld\n", (long)TEMP_FROM_REG(data->reg)); \ + return sprintf(buf,"%ld\n", (long)TEMP_FROM_REG(data->reg)*10); \ } \ } show_temp_reg(temp); @@ -516,7 +516,7 @@ struct w83781d_data *data = i2c_get_clientdata(client); \ u32 val; \ \ - val = simple_strtoul(buf, NULL, 10); \ + val = simple_strtoul(buf, NULL, 10)/10; \ \ if (nr >= 2) { /* TEMP2 and TEMP3 */ \ if (data->type == as99127f) \

--=_courier-26951-1057912676-0001-2--