public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Dittmer <j.dittmer@portrix.net>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org
Subject: Convert w83781d i2c chip driver to milli Celsius
Date: Fri, 11 Jul 2003 10:33:29 +0200	[thread overview]
Message-ID: <3F0E7659.8000503@portrix.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

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

[-- Attachment #2: i2c.w83781d.temp --]
[-- Type: text/plain, Size: 1042 bytes --]

--- 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) \

             reply	other threads:[~2003-07-11  8:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-11  8:33 Jan Dittmer [this message]
2003-07-14  5:24 ` Convert w83781d i2c chip driver to milli Celsius Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F0E7659.8000503@portrix.net \
    --to=j.dittmer@portrix.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox