diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-03-24 11:31:33 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-03-24 11:31:33 +0200 |
| commit | ba26d5c75c21dc0407d0461829f62fa2145e2f08 (patch) | |
| tree | 67f44fc695189ae3ac28a931b6856991535167fe | |
| parent | 62412528ae90b37172675264d7129663a0341ccb (diff) | |
| parent | 3865f5c94cb90d16810b7e751fa79034321ea836 (diff) | |
| download | hid-tmff2-ba26d5c75c21dc0407d0461829f62fa2145e2f08.tar.gz hid-tmff2-ba26d5c75c21dc0407d0461829f62fa2145e2f08.zip | |
Merge branch 't248' of 192.168.122.1:~/Documents/Projects/hid-tmff2 into t248
| -rw-r--r-- | hid-tmff2.c | 7 |
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); |
