diff options
Diffstat (limited to 'drivers/input/tablet/wacom_wac.c')
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index f3e91f0b57ae..b2aa503c16b1 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -1445,13 +1445,6 @@ void wacom_setup_device_quirks(struct wacom_features *features) | |||
1445 | } | 1445 | } |
1446 | } | 1446 | } |
1447 | 1447 | ||
1448 | static unsigned int wacom_calculate_touch_res(unsigned int logical_max, | ||
1449 | unsigned int physical_max) | ||
1450 | { | ||
1451 | /* Touch physical dimensions are in 100th of mm */ | ||
1452 | return (logical_max * 100) / physical_max; | ||
1453 | } | ||
1454 | |||
1455 | static void wacom_abs_set_axis(struct input_dev *input_dev, | 1448 | static void wacom_abs_set_axis(struct input_dev *input_dev, |
1456 | struct wacom_wac *wacom_wac) | 1449 | struct wacom_wac *wacom_wac) |
1457 | { | 1450 | { |
@@ -1475,11 +1468,9 @@ static void wacom_abs_set_axis(struct input_dev *input_dev, | |||
1475 | input_set_abs_params(input_dev, ABS_Y, 0, | 1468 | input_set_abs_params(input_dev, ABS_Y, 0, |
1476 | features->y_max, features->y_fuzz, 0); | 1469 | features->y_max, features->y_fuzz, 0); |
1477 | input_abs_set_res(input_dev, ABS_X, | 1470 | input_abs_set_res(input_dev, ABS_X, |
1478 | wacom_calculate_touch_res(features->x_max, | 1471 | features->x_resolution); |
1479 | features->x_phy)); | ||
1480 | input_abs_set_res(input_dev, ABS_Y, | 1472 | input_abs_set_res(input_dev, ABS_Y, |
1481 | wacom_calculate_touch_res(features->y_max, | 1473 | features->y_resolution); |
1482 | features->y_phy)); | ||
1483 | } | 1474 | } |
1484 | 1475 | ||
1485 | if (features->touch_max > 1) { | 1476 | if (features->touch_max > 1) { |
@@ -1488,11 +1479,9 @@ static void wacom_abs_set_axis(struct input_dev *input_dev, | |||
1488 | input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, | 1479 | input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, |
1489 | features->y_max, features->y_fuzz, 0); | 1480 | features->y_max, features->y_fuzz, 0); |
1490 | input_abs_set_res(input_dev, ABS_MT_POSITION_X, | 1481 | input_abs_set_res(input_dev, ABS_MT_POSITION_X, |
1491 | wacom_calculate_touch_res(features->x_max, | 1482 | features->x_resolution); |
1492 | features->x_phy)); | ||
1493 | input_abs_set_res(input_dev, ABS_MT_POSITION_Y, | 1483 | input_abs_set_res(input_dev, ABS_MT_POSITION_Y, |
1494 | wacom_calculate_touch_res(features->y_max, | 1484 | features->y_resolution); |
1495 | features->y_phy)); | ||
1496 | } | 1485 | } |
1497 | } | 1486 | } |
1498 | } | 1487 | } |