Comments

Some code that is in ams_exit() (the module exit code) should instead
be called when the device (not module) is removed. It probably doesn't
make much of a difference in the PMU case, but in the I2C case it does
matter.
I make no guarantee that my fix isn't racy, I'm not familiar enough
with the ams driver code to tell for sure.
Signed-off-by: Jean Delvare <khali@linux-fr.org>Tested-by: Christian Kujau <lists@nerdbynature.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Stelian Pop <stelian@popies.net>
Cc: Michael Hanselmann <linux-kernel@hansmi.ch>
Cc: stable@kernel.org
---
Christian tested the I2C variant of the chip, it would be nice if
someone could test the PMU variant too.
drivers/hwmon/ams/ams-core.c | 11 +++++++----
drivers/hwmon/ams/ams-i2c.c | 2 ++
drivers/hwmon/ams/ams-pmu.c | 2 ++
drivers/hwmon/ams/ams.h | 1 +
4 files changed, 12 insertions(+), 4 deletions(-)

Ben,
I cannot find those two patches from Jean [0] in your tree, I take it
they'll be included and pushed to Linus in 2.6.34 then?
(Although I had hoped to see them in 2.6.33, I'm "testing"[1] them since
-rc2 on my PowerBook)
Thanks,
Christian.
[0] http://lists.ozlabs.org/pipermail/linuxppc-dev/2010-February/079958.html
http://lists.ozlabs.org/pipermail/linuxppc-dev/2010-February/079959.html
[1] http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg40983.html