summaryrefslogtreecommitdiff
path: root/drivers/hwmon/occ/p8_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/occ/p8_i2c.c')
-rw-r--r--drivers/hwmon/occ/p8_i2c.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/hwmon/occ/p8_i2c.c b/drivers/hwmon/occ/p8_i2c.c
index e4c2c047b99c..b59efc945e54 100644
--- a/drivers/hwmon/occ/p8_i2c.c
+++ b/drivers/hwmon/occ/p8_i2c.c
@@ -223,6 +223,15 @@ static int p8_i2c_occ_probe(struct i2c_client *client,
return occ_setup(occ, "p8_occ");
}
+static int p8_i2c_occ_remove(struct i2c_client *client)
+{
+ struct occ *occ = dev_get_drvdata(&client->dev);
+
+ occ_shutdown(occ);
+
+ return 0;
+}
+
static const struct of_device_id p8_i2c_occ_of_match[] = {
{ .compatible = "ibm,p8-occ-hwmon" },
{}
@@ -236,6 +245,7 @@ static struct i2c_driver p8_i2c_occ_driver = {
.of_match_table = p8_i2c_occ_of_match,
},
.probe = p8_i2c_occ_probe,
+ .remove = p8_i2c_occ_remove,
};
module_i2c_driver(p8_i2c_occ_driver);