diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-01-04 21:49:58 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-01-04 21:49:58 +0200 |
| commit | c26573d77369c042dc2b9a881a7f2ff88ddc0dd9 (patch) | |
| tree | 3cfecb6395613274e0e3dcd0752c3ba6dc8a5363 /src/tmtx | |
| parent | 26995429a3b92047f0c2f9ab90fe4202c86fd72b (diff) | |
| download | hid-tmff2-c26573d77369c042dc2b9a881a7f2ff88ddc0dd9.tar.gz hid-tmff2-c26573d77369c042dc2b9a881a7f2ff88ddc0dd9.zip | |
use on_hid_hw_open instead of input_dev->open
+ Seems some applications can mess with input_dev->open, still unclear
how but on_hid_hw_open seems to be a bit more reliable so use it for
now at least
Diffstat (limited to 'src/tmtx')
| -rw-r--r-- | src/tmtx/hid-tmtx.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/tmtx/hid-tmtx.c b/src/tmtx/hid-tmtx.c index 857886c..f1f1b32 100644 --- a/src/tmtx/hid-tmtx.c +++ b/src/tmtx/hid-tmtx.c @@ -196,17 +196,15 @@ static int tx_send_open(struct t300rs_device_entry *tx) return 0; } -static int tx_open(void *data, int open_mode) +static void tx_open(void *data, int open_mode) { struct t300rs_device_entry *tx = data; if (!tx) - return -ENODEV; + return; if (open_mode) tx_send_open(tx); - - return tx->open(tx->input_dev); } static int tx_send_close(struct t300rs_device_entry *tx) @@ -225,18 +223,15 @@ static int tx_send_close(struct t300rs_device_entry *tx) return 0; } -static int tx_close(void *data, int open_mode) +static void tx_close(void *data, int open_mode) { struct t300rs_device_entry *tx = data; if (!tx) - return -ENODEV; + return; if (open_mode) tx_send_close(tx); - - tx->close(tx->input_dev); - return 0; } static int tx_wheel_init(struct tmff2_device_entry *tmff2, int open_mode) @@ -267,9 +262,6 @@ static int tx_wheel_init(struct tmff2_device_entry *tmff2, int open_mode) tx->report = list_entry(report_list->next, struct hid_report, list); tx->ff_field = tx->report->field[0]; - tx->open = tx->input_dev->open; - tx->close = tx->input_dev->close; - if ((ret = tx_interrupts(tx))) goto interrupt_err; |
