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/hid-tmff2.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/hid-tmff2.h') diff --git a/src/hid-tmff2.h b/src/hid-tmff2.h index 6ad1d82..213bebe 100644 --- a/src/hid-tmff2.h +++ b/src/hid-tmff2.h @@ -82,8 +82,8 @@ struct tmff2_device_entry { int (*wheel_destroy)(void *data); /* optional callbacks */ - int (*open)(void *data, int); - int (*close)(void *data, int); + void (*open)(void *data, int); + void (*close)(void *data, int); int (*set_gain)(void *data, uint16_t gain); int (*set_range)(void *data, uint16_t range); /* switch_mode is required to not do anything if we're alredy in the @@ -128,9 +128,6 @@ struct t300rs_device_entry { struct hid_field *ff_field; struct usb_device *usbdev; - int (*open)(struct input_dev *dev); - void (*close)(struct input_dev *dev); - int mode; int attachment; u8 buffer_length; @@ -142,8 +139,8 @@ int t300rs_upload_effect(void *, const struct tmff2_effect_state *); int t300rs_update_effect(void *, const struct tmff2_effect_state *); int t300rs_stop_effect(void *, const struct tmff2_effect_state *); -int t300rs_open(void *, int); -int t300rs_close(void *, int); +void t300rs_open(void *, int); +void t300rs_close(void *, int); int t300rs_set_gain(void *, uint16_t); int t300rs_set_range(void *, uint16_t); int t300rs_set_autocenter(void *, uint16_t); -- cgit v1.3