diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-11-27 12:50:54 +0300 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2010-12-16 12:41:12 +0300 |
commit | 8cde81001626c4c60b26ef2eb5fc522885ed9fd0 (patch) | |
tree | 9e9092cae44615376c5e3de98b8b259d137eb987 /drivers/hid | |
parent | 47c78e891323513e9909729b44033e2c6649e2b7 (diff) | |
download | linux-8cde81001626c4c60b26ef2eb5fc522885ed9fd0.tar.xz |
input: mt: Collect slots initialization code
The MT slots devices all follow the same initialization pattern
of creating slots and hinting about buffer size. Let drivers call
an initialization function instead, and make sure it can be called
repeatedly without side effects.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-3m-pct.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/hid/hid-3m-pct.c b/drivers/hid/hid-3m-pct.c index 18575a4e0d63..ea475964d05a 100644 --- a/drivers/hid/hid-3m-pct.c +++ b/drivers/hid/hid-3m-pct.c @@ -29,7 +29,6 @@ MODULE_LICENSE("GPL"); #define MAX_SLOTS 60 #define MAX_TRKID USHRT_MAX -#define MAX_EVENTS 360 /* estimated signal-to-noise ratios */ #define SN_MOVE 2048 @@ -123,9 +122,7 @@ static int mmm_input_mapping(struct hid_device *hdev, struct hid_input *hi, EV_ABS, ABS_MT_TRACKING_ID); input_set_abs_params(hi->input, ABS_MT_TRACKING_ID, 0, MAX_TRKID, 0, 0); - if (!hi->input->mt) - input_mt_create_slots(hi->input, MAX_SLOTS); - input_set_events_per_packet(hi->input, MAX_EVENTS); + input_mt_init_slots(hi->input, MAX_SLOTS); return 1; } /* let hid-input decide for the others */ |