* Small bug fix in mtp008.c
@ 2005-05-19 6:25 Kris Van Hees
2005-05-19 6:25 ` Jean Delvare
0 siblings, 1 reply; 2+ messages in thread
From: Kris Van Hees @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Here is a small patch that fixes the setting of limits on the temp2 sensors
in the MTP008 chip. The code (embarassingly written by myself when I wrote
the MTP008 chip driver a long time ago) would always update the hyst and max
limits of the first temp sensor, even when you tried to set it for the 2nd
or 3rd sensors.
Kris
--
Never underestimate a Mage with:
- the Intelligence to cast Magic Missile,
- the Constitution to survive the first hit, and
- the Dexterity to run fast enough to avoid being hit a second time.
-------------- next part --------------
Index: kernel/chips/mtp008.c
=================================RCS file: /home/cvs/lm_sensors2/kernel/chips/mtp008.c,v
retrieving revision 1.21
diff -u -2 -r1.21 mtp008.c
--- kernel/chips/mtp008.c 17 Apr 2004 17:20:01 -0000 1.21
+++ kernel/chips/mtp008.c 27 Jul 2004 03:52:50 -0000
@@ -2,5 +2,5 @@
mtp008.c - Part of lm_sensors, Linux kernel modules for hardware
monitoring
- Copyright (c) 2001 Kris Van Hees <aedil@alchar.org>
+ Copyright (c) 2001-2004 Kris Van Hees <aedil@alchar.org>
This program is free software; you can redistribute it and/or modify
@@ -338,7 +338,7 @@
&i2c_proc_real, &i2c_sysctl_real, NULL, &mtp008_temp},
{MTP008_SYSCTL_TEMP2, "temp2", NULL, 0, 0644, NULL,
- &i2c_proc_real, &i2c_sysctl_real, NULL, &mtp008_temp_add},
+ &i2c_proc_real, &i2c_sysctl_real, NULL, &mtp008_temp_add},
{MTP008_SYSCTL_TEMP3, "temp3", NULL, 0, 0644, NULL,
- &i2c_proc_real, &i2c_sysctl_real, NULL, &mtp008_temp_add},
+ &i2c_proc_real, &i2c_sysctl_real, NULL, &mtp008_temp_add},
{MTP008_SYSCTL_VID, "vid", NULL, 0, 0444, NULL,
&i2c_proc_real, &i2c_sysctl_real, NULL, &mtp008_vid},
@@ -810,11 +810,15 @@
if (*nrels_mag >= 1) {
data->in_max[nr] = TEMP_TO_REG(results[0]);
- mtp008_write_value(client, MTP008_REG_TEMP_MAX,
- data->in_max[nr]);
+ mtp008_write_value(
+ client, MTP008_REG_IN_MAX(nr),
+ data->in_max[nr]
+ );
}
if (*nrels_mag >= 2) {
data->in_min[nr] = TEMP_TO_REG(results[1]);
- mtp008_write_value(client, MTP008_REG_TEMP_MIN,
- data->in_min[nr]);
+ mtp008_write_value(
+ client, MTP008_REG_IN_MIN(nr),
+ data->in_min[nr]
+ );
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Small bug fix in mtp008.c
2005-05-19 6:25 Small bug fix in mtp008.c Kris Van Hees
@ 2005-05-19 6:25 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
> Here is a small patch that fixes the setting of limits on the temp2
> sensors in the MTP008 chip. The code (embarassingly written by myself
> when I wrote the MTP008 chip driver a long time ago) would always
> update the hyst and max limits of the first temp sensor, even when you
> tried to set it for the 2nd or 3rd sensors.
Applied (with cosmetic edits), thanks.
--
Jean "Khali" Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-19 6:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19 6:25 Small bug fix in mtp008.c Kris Van Hees
2005-05-19 6:25 ` Jean Delvare
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.