Commit 4cc98345 authored by Wen-chien Jesse Sung's avatar Wen-chien Jesse Sung Committed by Jiri Kosina

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: default avatarWen-chien Jesse Sung <jesse.sung@canonical.com>
Acked-by: default avatarRafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent ca9bbdcc
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment