aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorWen-chien Jesse Sung <jesse.sung@canonical.com>2012-09-25 06:51:07 -0400
committerJiri Kosina <jkosina@suse.cz>2012-09-25 09:20:07 -0400
commit4cc9834518efed3b69d3a8ff3bd162e089f68d34 (patch)
tree9fa4256bea8f412d68852f8e720e697562769de4 /drivers/hid
parentca9bbdcc89ecc1018215ec7f7e881840d40404c4 (diff)
HID: ntrig: change default value of logical/physical width/height to 1
Since something will be divided by these variables in show_min_width()/show_min_height() and show_activate_width()/ show_activate_height(), a divided error would be triggered if they are zero. Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com> Acked-by: Rafi Rubin <rafi@seas.upenn.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-ntrig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 9fae2ebdd758..86a969f63292 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -882,10 +882,10 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
882 nd->activate_slack = activate_slack; 882 nd->activate_slack = activate_slack;
883 nd->act_state = activate_slack; 883 nd->act_state = activate_slack;
884 nd->deactivate_slack = -deactivate_slack; 884 nd->deactivate_slack = -deactivate_slack;
885 nd->sensor_logical_width = 0; 885 nd->sensor_logical_width = 1;
886 nd->sensor_logical_height = 0; 886 nd->sensor_logical_height = 1;
887 nd->sensor_physical_width = 0; 887 nd->sensor_physical_width = 1;
888 nd->sensor_physical_height = 0; 888 nd->sensor_physical_height = 1;
889 889
890 hid_set_drvdata(hdev, nd); 890 hid_set_drvdata(hdev, nd);
891 891