aboutsummaryrefslogtreecommitdiff
path: root/hid-tmff2.c
diff options
context:
space:
mode:
Diffstat (limited to 'hid-tmff2.c')
-rw-r--r--hid-tmff2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hid-tmff2.c b/hid-tmff2.c
index 3cfd1ad..d632b09 100644
--- a/hid-tmff2.c
+++ b/hid-tmff2.c
@@ -408,7 +408,7 @@ static void tmff2_close(struct input_dev *dev)
return;
if (tmff2->close) {
- tmff2->close(tmff2->data);
+ tmff2->close(tmff2->data, tmff2->hdev != 0);
return;
}
@@ -524,6 +524,7 @@ static int tmff2_wheel_init(struct tmff2_device_entry *tmff2)
return 0;
+ input_ff_destroy(tmff2->input_dev);
err:
return ret;
}
@@ -611,7 +612,6 @@ static void tmff2_remove(struct hid_device *hdev)
if (!tmff2)
return;
-
cancel_delayed_work_sync(&tmff2->work);
dev = &tmff2->hdev->dev;
@@ -627,6 +627,9 @@ static void tmff2_remove(struct hid_device *hdev)
if (tmff2->params & PARAM_ALT_MODE)
device_remove_file(dev, &dev_attr_alt_mode);
+ /* indicate that the underlying usb device should not be assumed to be
+ * accessible */
+ tmff2->hdev = 0;
hid_hw_stop(hdev);
tmff2->wheel_destroy(tmff2->data);