Skip to content

Commit

Permalink
HID: rmi: fix wrong struct field name
Browse files Browse the repository at this point in the history
x_size_mm should be y_size_mm, otherwise neither the duplicated
condition nor the assignment make any sense whatsoever.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jiri Kosina committed May 13, 2014
1 parent dcce583 commit b668fdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/hid-rmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,9 +787,9 @@ static void rmi_input_configured(struct hid_device *hdev, struct hid_input *hi)
input_set_abs_params(input, ABS_MT_POSITION_X, 1, data->max_x, 0, 0);
input_set_abs_params(input, ABS_MT_POSITION_Y, 1, data->max_y, 0, 0);

if (data->x_size_mm && data->x_size_mm) {
if (data->x_size_mm && data->y_size_mm) {
res_x = (data->max_x - 1) / data->x_size_mm;
res_y = (data->max_y - 1) / data->x_size_mm;
res_y = (data->max_y - 1) / data->y_size_mm;

input_abs_set_res(input, ABS_MT_POSITION_X, res_x);
input_abs_set_res(input, ABS_MT_POSITION_Y, res_y);
Expand Down

0 comments on commit b668fdc

Please sign in to comment.