]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
HID: ntrig: change default value of logical/physical width/height to 1
authorWen-chien Jesse Sung <jesse.sung@canonical.com>
Tue, 25 Sep 2012 10:51:07 +0000 (18:51 +0800)
committerJiri Kosina <jkosina@suse.cz>
Tue, 25 Sep 2012 13:20:07 +0000 (15:20 +0200)
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>
drivers/hid/hid-ntrig.c

index 9fae2ebdd7586c0cbc49830763a1d9fd232f95db..86a969f6329297f9b34c9866b1bb39c5a0c85638 100644 (file)
@@ -882,10 +882,10 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
        nd->activate_slack = activate_slack;
        nd->act_state = activate_slack;
        nd->deactivate_slack = -deactivate_slack;
-       nd->sensor_logical_width = 0;
-       nd->sensor_logical_height = 0;
-       nd->sensor_physical_width = 0;
-       nd->sensor_physical_height = 0;
+       nd->sensor_logical_width = 1;
+       nd->sensor_logical_height = 1;
+       nd->sensor_physical_width = 1;
+       nd->sensor_physical_height = 1;
 
        hid_set_drvdata(hdev, nd);