Re: [PATCH] bad temperature values from w83781d in 2.6.22

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 9 Aug 2007 08:26:19 -0400, Mark M. Hoffman wrote:
> Author: Mark M. Hoffman <[email protected]>
> Date:   Thu Aug 9 08:12:46 2007 -0400
> 
>     hwmon: fix w83781d temp sensor type setting
>     
>     Commit 348753379a7704087603dad403603e825422fd9a introduced a regression that
>     caused temp2 and temp3 sensor type settings to be written to temp1 instead.
>     The result is that temp sensor readings could be way off.
>     
>     Signed-off-by: Mark M. Hoffman <[email protected]>

Good catch, sorry for messing up. My test chip is a W83781D, it doesn't
have thermal sensor type selection, so I couldn't test that.

Acked-by: Jean Delvare <[email protected]>

> diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
> index f85b48f..c95909c 100644
> --- a/drivers/hwmon/w83781d.c
> +++ b/drivers/hwmon/w83781d.c
> @@ -740,9 +740,9 @@ store_sensor(struct device *dev, struct device_attribute *da,
>  static SENSOR_DEVICE_ATTR(temp1_type, S_IRUGO | S_IWUSR,
>  	show_sensor, store_sensor, 0);
>  static SENSOR_DEVICE_ATTR(temp2_type, S_IRUGO | S_IWUSR,
> -	show_sensor, store_sensor, 0);
> +	show_sensor, store_sensor, 1);
>  static SENSOR_DEVICE_ATTR(temp3_type, S_IRUGO | S_IWUSR,
> -	show_sensor, store_sensor, 0);
> +	show_sensor, store_sensor, 2);
>  
>  /* I2C devices get this name attribute automatically, but for ISA devices
>     we must create it by ourselves. */


-- 
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux