aboutsummaryrefslogtreecommitdiff
path: root/src/tmt248
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2026-01-04 21:49:58 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2026-01-04 21:49:58 +0200
commitc26573d77369c042dc2b9a881a7f2ff88ddc0dd9 (patch)
tree3cfecb6395613274e0e3dcd0752c3ba6dc8a5363 /src/tmt248
parent26995429a3b92047f0c2f9ab90fe4202c86fd72b (diff)
downloadhid-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/tmt248')
-rw-r--r--src/tmt248/hid-tmt248.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/tmt248/hid-tmt248.c b/src/tmt248/hid-tmt248.c
index 9ac43d9..4c42264 100644
--- a/src/tmt248/hid-tmt248.c
+++ b/src/tmt248/hid-tmt248.c
@@ -208,17 +208,15 @@ static int t248_send_open(struct t300rs_device_entry *t248)
return 0;
}
-static int t248_open(void *data, int open_mode)
+static void t248_open(void *data, int open_mode)
{
struct t300rs_device_entry *t248 = data;
if (!t248)
- return -ENODEV;
+ return;
if (open_mode)
t248_send_open(t248);
-
- return t248->open(t248->input_dev);
}
static int t248_send_close(struct t300rs_device_entry *t248)
@@ -237,18 +235,14 @@ static int t248_send_close(struct t300rs_device_entry *t248)
return 0;
}
-static int t248_close(void *data, int open_mode)
+static void t248_close(void *data, int open_mode)
{
struct t300rs_device_entry *t248 = data;
-
if (!t248)
- return -ENODEV;
+ return;
if (open_mode)
t248_send_close(t248);
-
- t248->close(t248->input_dev);
- return 0;
}
static int t248_wheel_init(struct tmff2_device_entry *tmff2, int open_mode)
@@ -279,9 +273,6 @@ static int t248_wheel_init(struct tmff2_device_entry *tmff2, int open_mode)
t248->report = list_entry(report_list->next, struct hid_report, list);
t248->ff_field = t248->report->field[0];
- t248->open = t248->input_dev->open;
- t248->close = t248->input_dev->close;
-
if ((ret = t248_interrupts(t248)))
goto interrupt_err;