From 9ba7722511c205ed07aaa25ed5ac3c2a6862df46 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Wed, 13 Oct 2010 22:34:23 +0200 Subject: Fix module-reload bug Bug found by tito; every time the module is reloaded, the logical maximum would increase by a factor of eight. Signed-off-by: Henrik Rydberg --- usr/src/dkms_source_tree/hid-egalax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/src') diff --git a/usr/src/dkms_source_tree/hid-egalax.c b/usr/src/dkms_source_tree/hid-egalax.c index 7519d95..00c3af6 100644 --- a/usr/src/dkms_source_tree/hid-egalax.c +++ b/usr/src/dkms_source_tree/hid-egalax.c @@ -70,7 +70,7 @@ static int egalax_input_mapping(struct hid_device *hdev, struct hid_input *hi, case HID_UP_GENDESK: switch (usage->hid) { case HID_GD_X: - field->logical_maximum <<= 3; + field->logical_maximum = 32760; hid_map_usage(hi, usage, bit, max, EV_ABS, ABS_MT_POSITION_X); set_abs(input, ABS_MT_POSITION_X, field, SN_MOVE); @@ -78,7 +78,7 @@ static int egalax_input_mapping(struct hid_device *hdev, struct hid_input *hi, set_abs(input, ABS_X, field, SN_MOVE); return 1; case HID_GD_Y: - field->logical_maximum <<= 3; + field->logical_maximum = 32760; hid_map_usage(hi, usage, bit, max, EV_ABS, ABS_MT_POSITION_Y); set_abs(input, ABS_MT_POSITION_Y, field, SN_MOVE); -- cgit v1.2.3