aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/ams/ams-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/ams/ams-i2c.c')
-rw-r--r--drivers/hwmon/ams/ams-i2c.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/ams/ams-i2c.c b/drivers/hwmon/ams/ams-i2c.c
index 2cbf8a6506c..abeecd27b48 100644
--- a/drivers/hwmon/ams/ams-i2c.c
+++ b/drivers/hwmon/ams/ams-i2c.c
@@ -238,6 +238,8 @@ static int ams_i2c_probe(struct i2c_client *client,
static int ams_i2c_remove(struct i2c_client *client)
{
if (ams_info.has_device) {
+ ams_sensor_detach();
+
/* Disable interrupts */
ams_i2c_set_irq(AMS_IRQ_ALL, 0);