aboutsummaryrefslogtreecommitdiff
path: root/src/hid-tmff2.h
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/hid-tmff2.h
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/hid-tmff2.h')
-rw-r--r--src/hid-tmff2.h11
1 files changed, 4 insertions, 7 deletions
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);