summaryrefslogtreecommitdiff
path: root/drivers/input/tablet/wacom_wac.c
diff options
context:
space:
mode:
authorPing Cheng <pinglinux@gmail.com>2013-07-28 00:38:54 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-08-12 22:31:12 -0700
commit401d7d108fc19595f6a7d7dd7d553458155e31fa (patch)
tree0f29d91e6ddebfef6b27eb25c2016d538c00b0d1 /drivers/input/tablet/wacom_wac.c
parent7bf2a98a436ebc60b5388b1cb5fd3d0fbf78814c (diff)
Input: wacom - integrate resolution calculation
Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/tablet/wacom_wac.c')
-rw-r--r--drivers/input/tablet/wacom_wac.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 518282da6d85..541197b7b973 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1443,13 +1443,6 @@ void wacom_setup_device_quirks(struct wacom_features *features)
}
}
-static unsigned int wacom_calculate_touch_res(unsigned int logical_max,
- unsigned int physical_max)
-{
- /* Touch physical dimensions are in 100th of mm */
- return (logical_max * 100) / physical_max;
-}
-
static void wacom_abs_set_axis(struct input_dev *input_dev,
struct wacom_wac *wacom_wac)
{
@@ -1473,11 +1466,9 @@ static void wacom_abs_set_axis(struct input_dev *input_dev,
input_set_abs_params(input_dev, ABS_Y, 0,
features->y_max, features->y_fuzz, 0);
input_abs_set_res(input_dev, ABS_X,
- wacom_calculate_touch_res(features->x_max,
- features->x_phy));
+ features->x_resolution);
input_abs_set_res(input_dev, ABS_Y,
- wacom_calculate_touch_res(features->y_max,
- features->y_phy));
+ features->y_resolution);
}
if (features->touch_max > 1) {
@@ -1486,11 +1477,9 @@ static void wacom_abs_set_axis(struct input_dev *input_dev,
input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0,
features->y_max, features->y_fuzz, 0);
input_abs_set_res(input_dev, ABS_MT_POSITION_X,
- wacom_calculate_touch_res(features->x_max,
- features->x_phy));
+ features->x_resolution);
input_abs_set_res(input_dev, ABS_MT_POSITION_Y,
- wacom_calculate_touch_res(features->y_max,
- features->y_phy));
+ features->y_resolution);
}
}
}