diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-01-30 23:03:23 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-03 01:39:49 -0500 |
commit | 98ceb75c7c14eada76b0aa9f03a635a735cee3cb (patch) | |
tree | d514b307399db60cdbc1fd9461e8b5af5655ca0a /drivers/hwmon/ams/ams-pmu.c | |
parent | 33a470f6d5e1879c26f16f6b34dc09f82d44f6e9 (diff) |
macintosh/hwmon/ams: Fix device removal sequence
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
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/hwmon/ams/ams-pmu.c')
-rw-r--r-- | drivers/hwmon/ams/ams-pmu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/ams/ams-pmu.c b/drivers/hwmon/ams/ams-pmu.c index fb18b3d3162..4f61b3ee1b0 100644 --- a/drivers/hwmon/ams/ams-pmu.c +++ b/drivers/hwmon/ams/ams-pmu.c | |||
@@ -133,6 +133,8 @@ static void ams_pmu_get_xyz(s8 *x, s8 *y, s8 *z) | |||
133 | 133 | ||
134 | static void ams_pmu_exit(void) | 134 | static void ams_pmu_exit(void) |
135 | { | 135 | { |
136 | ams_sensor_detach(); | ||
137 | |||
136 | /* Disable interrupts */ | 138 | /* Disable interrupts */ |
137 | ams_pmu_set_irq(AMS_IRQ_ALL, 0); | 139 | ams_pmu_set_irq(AMS_IRQ_ALL, 0); |
138 | 140 | ||