diff options
author | Jiri Kosina <jkosina@suse.cz> | 2014-05-13 15:17:29 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-05-13 15:17:39 -0400 |
commit | b668fdce41858feea6052419796beb36f1c60540 (patch) | |
tree | ec9a35c2be7b78ec5eeeb89ff54d81900096e294 | |
parent | dcce583792d2b9a83dd9cb62551831f09f971fda (diff) |
HID: rmi: fix wrong struct field name
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>
-rw-r--r-- | drivers/hid/hid-rmi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c index 05e4928c06f1..7ebdc960942b 100644 --- a/drivers/hid/hid-rmi.c +++ b/drivers/hid/hid-rmi.c | |||
@@ -787,9 +787,9 @@ static void rmi_input_configured(struct hid_device *hdev, struct hid_input *hi) | |||
787 | input_set_abs_params(input, ABS_MT_POSITION_X, 1, data->max_x, 0, 0); | 787 | input_set_abs_params(input, ABS_MT_POSITION_X, 1, data->max_x, 0, 0); |
788 | input_set_abs_params(input, ABS_MT_POSITION_Y, 1, data->max_y, 0, 0); | 788 | input_set_abs_params(input, ABS_MT_POSITION_Y, 1, data->max_y, 0, 0); |
789 | 789 | ||
790 | if (data->x_size_mm && data->x_size_mm) { | 790 | if (data->x_size_mm && data->y_size_mm) { |
791 | res_x = (data->max_x - 1) / data->x_size_mm; | 791 | res_x = (data->max_x - 1) / data->x_size_mm; |
792 | res_y = (data->max_y - 1) / data->x_size_mm; | 792 | res_y = (data->max_y - 1) / data->y_size_mm; |
793 | 793 | ||
794 | input_abs_set_res(input, ABS_MT_POSITION_X, res_x); | 794 | input_abs_set_res(input, ABS_MT_POSITION_X, res_x); |
795 | input_abs_set_res(input, ABS_MT_POSITION_Y, res_y); | 795 | input_abs_set_res(input, ABS_MT_POSITION_Y, res_y); |