[lm-sensors] [PATCH] lm75.c write values below 0°C
Jean Delvare
khali at linux-fr.org
Sun Aug 12 13:13:52 CEST 2007
Hi Christian,
On Tue, 24 Jul 2007 15:43:28 +0200, Christian Hohnstaedt wrote:
> On Tue, Jul 24, 2007 at 03:09:57PM +0200, Jean Delvare wrote:
> > Good point. But what this means then is that LM75_TEMP_TO_REG() should
> > take a long as a parameter rather than an int.
>
> Sounds reasonable.
>
> Then LM75_TEMP_FROM_REG() should also return a long instead of an int.
This doesn't really matter. A long is needed for LM75_TEMP_TO_REG()
because that's what simple_strtol() gives, but in the other direction,
we use sprintf, which can handle both an int or a long.
> Other drivers using LM75_TEMP_TO_REG:
>
> driver temp.type func
> ------------------------------------
> asb100.c long strtoul
> ds1621.c direct strtoul
> w83627e?hf.c u32 strtoul
> w83781d.c s32 strtol
>
> Looks like there is some kind of general inconsistency :-)
Indeed. Can you please send a patch fixing all the affected drivers?
Thanks,
--
Jean Delvare
More information about the lm-sensors
mailing list