
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

The adt746x driver currently adds a "°C" suffix to temperatures exposed via
sysfs, and I don't like that.  First, we all agree that any other unit here
makes no sense (do we ?  do we ?  yes of course :) and I don't like having
anything but numbers in there, and finally it's more consistent with what
the g5 driver does.

And finally, the _REAL_ reason is that this is not a low ASCII character
and so has nothing to do in the kernel sources or in /sys :)

Unfortunately, generating a patch here is nasty because of that (my mailer
is rightfully complaining about the non-ASCII char on text import) so you
might have to apply by hand...

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/macintosh/therm_adt746x.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff -puN drivers/macintosh/therm_adt746x.c~pmac-dont-add-=iso-8859-1q=22=b0c=22=-suffix-in-sys drivers/macintosh/therm_adt746x.c
--- 25/drivers/macintosh/therm_adt746x.c~pmac-dont-add-=iso-8859-1q=22=b0c=22=-suffix-in-sys	2004-09-17 00:52:23.452948504 -0700
+++ 25-akpm/drivers/macintosh/therm_adt746x.c	2004-09-17 00:52:23.456947896 -0700
@@ -417,11 +417,6 @@ attach_one_thermostat(struct i2c_adapter
  * choice but implement a bunch of them...
  *
  */
-#define BUILD_SHOW_FUNC_DEG(name, data)				\
-static ssize_t show_##name(struct device *dev, char *buf)	\
-{								\
-	return sprintf(buf, "%d°C\n", data);			\
-}
 #define BUILD_SHOW_FUNC_INT(name, data)				\
 static ssize_t show_##name(struct device *dev, char *buf)	\
 {								\
@@ -453,10 +448,10 @@ static ssize_t store_##name(struct devic
 	return n;						\
 }
 
-BUILD_SHOW_FUNC_DEG(cpu_temperature,	 (read_reg(thermostat, TEMP_REG[1])))
-BUILD_SHOW_FUNC_DEG(gpu_temperature,	 (read_reg(thermostat, TEMP_REG[2])))
-BUILD_SHOW_FUNC_DEG(cpu_limit,		 thermostat->limits[1])
-BUILD_SHOW_FUNC_DEG(gpu_limit,		 thermostat->limits[2])
+BUILD_SHOW_FUNC_INT(cpu_temperature,	 (read_reg(thermostat, TEMP_REG[1])))
+BUILD_SHOW_FUNC_INT(gpu_temperature,	 (read_reg(thermostat, TEMP_REG[2])))
+BUILD_SHOW_FUNC_INT(cpu_limit,		 thermostat->limits[1])
+BUILD_SHOW_FUNC_INT(gpu_limit,		 thermostat->limits[2])
 
 BUILD_SHOW_FUNC_INT(specified_fan_speed, fan_speed)
 BUILD_SHOW_FUNC_INT(cpu_fan_speed,	 (read_fan_speed(thermostat, FAN_SPEED[0])))
_
