From c26573d77369c042dc2b9a881a7f2ff88ddc0dd9 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 4 Jan 2026 21:49:58 +0200 Subject: 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 --- src/tmt248/hid-tmt248.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/tmt248') 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; -- cgit v1.3