aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index cc41e1ef8255..b3ec4f2de875 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -1107,6 +1107,14 @@ static int i2c_hid_remove(struct i2c_client *client)
1107 return 0; 1107 return 0;
1108} 1108}
1109 1109
1110static void i2c_hid_shutdown(struct i2c_client *client)
1111{
1112 struct i2c_hid *ihid = i2c_get_clientdata(client);
1113
1114 i2c_hid_set_power(client, I2C_HID_PWR_SLEEP);
1115 free_irq(client->irq, ihid);
1116}
1117
1110#ifdef CONFIG_PM_SLEEP 1118#ifdef CONFIG_PM_SLEEP
1111static int i2c_hid_suspend(struct device *dev) 1119static int i2c_hid_suspend(struct device *dev)
1112{ 1120{
@@ -1231,7 +1239,7 @@ static struct i2c_driver i2c_hid_driver = {
1231 1239
1232 .probe = i2c_hid_probe, 1240 .probe = i2c_hid_probe,
1233 .remove = i2c_hid_remove, 1241 .remove = i2c_hid_remove,
1234 1242 .shutdown = i2c_hid_shutdown,
1235 .id_table = i2c_hid_id_table, 1243 .id_table = i2c_hid_id_table,
1236}; 1244};
1237 1245