diff options
Diffstat (limited to 'drivers/input/tablet/aiptek.c')
-rw-r--r-- | drivers/input/tablet/aiptek.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index 51b80b08d467..57b25b84d1fc 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c | |||
@@ -987,20 +987,17 @@ static int aiptek_program_tablet(struct aiptek *aiptek) | |||
987 | /* Query getXextension */ | 987 | /* Query getXextension */ |
988 | if ((ret = aiptek_query(aiptek, 0x01, 0x00)) < 0) | 988 | if ((ret = aiptek_query(aiptek, 0x01, 0x00)) < 0) |
989 | return ret; | 989 | return ret; |
990 | aiptek->inputdev->absmin[ABS_X] = 0; | 990 | input_set_abs_params(aiptek->inputdev, ABS_X, 0, ret - 1, 0, 0); |
991 | aiptek->inputdev->absmax[ABS_X] = ret - 1; | ||
992 | 991 | ||
993 | /* Query getYextension */ | 992 | /* Query getYextension */ |
994 | if ((ret = aiptek_query(aiptek, 0x01, 0x01)) < 0) | 993 | if ((ret = aiptek_query(aiptek, 0x01, 0x01)) < 0) |
995 | return ret; | 994 | return ret; |
996 | aiptek->inputdev->absmin[ABS_Y] = 0; | 995 | input_set_abs_params(aiptek->inputdev, ABS_Y, 0, ret - 1, 0, 0); |
997 | aiptek->inputdev->absmax[ABS_Y] = ret - 1; | ||
998 | 996 | ||
999 | /* Query getPressureLevels */ | 997 | /* Query getPressureLevels */ |
1000 | if ((ret = aiptek_query(aiptek, 0x08, 0x00)) < 0) | 998 | if ((ret = aiptek_query(aiptek, 0x08, 0x00)) < 0) |
1001 | return ret; | 999 | return ret; |
1002 | aiptek->inputdev->absmin[ABS_PRESSURE] = 0; | 1000 | input_set_abs_params(aiptek->inputdev, ABS_PRESSURE, 0, ret - 1, 0, 0); |
1003 | aiptek->inputdev->absmax[ABS_PRESSURE] = ret - 1; | ||
1004 | 1001 | ||
1005 | /* Depending on whether we are in absolute or relative mode, we will | 1002 | /* Depending on whether we are in absolute or relative mode, we will |
1006 | * do a switchToTablet(absolute) or switchToMouse(relative) command. | 1003 | * do a switchToTablet(absolute) or switchToMouse(relative) command. |
@@ -1054,8 +1051,8 @@ static ssize_t show_tabletSize(struct device *dev, struct device_attribute *attr | |||
1054 | struct aiptek *aiptek = dev_get_drvdata(dev); | 1051 | struct aiptek *aiptek = dev_get_drvdata(dev); |
1055 | 1052 | ||
1056 | return snprintf(buf, PAGE_SIZE, "%dx%d\n", | 1053 | return snprintf(buf, PAGE_SIZE, "%dx%d\n", |
1057 | aiptek->inputdev->absmax[ABS_X] + 1, | 1054 | input_abs_get_max(aiptek->inputdev, ABS_X) + 1, |
1058 | aiptek->inputdev->absmax[ABS_Y] + 1); | 1055 | input_abs_get_max(aiptek->inputdev, ABS_Y) + 1); |
1059 | } | 1056 | } |
1060 | 1057 | ||
1061 | /* These structs define the sysfs files, param #1 is the name of the | 1058 | /* These structs define the sysfs files, param #1 is the name of the |
@@ -1843,7 +1840,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1843 | for (i = 0; i < ARRAY_SIZE(speeds); ++i) { | 1840 | for (i = 0; i < ARRAY_SIZE(speeds); ++i) { |
1844 | aiptek->curSetting.programmableDelay = speeds[i]; | 1841 | aiptek->curSetting.programmableDelay = speeds[i]; |
1845 | (void)aiptek_program_tablet(aiptek); | 1842 | (void)aiptek_program_tablet(aiptek); |
1846 | if (aiptek->inputdev->absmax[ABS_X] > 0) { | 1843 | if (input_abs_get_max(aiptek->inputdev, ABS_X) > 0) { |
1847 | dev_info(&intf->dev, | 1844 | dev_info(&intf->dev, |
1848 | "Aiptek using %d ms programming speed\n", | 1845 | "Aiptek using %d ms programming speed\n", |
1849 | aiptek->curSetting.programmableDelay); | 1846 | aiptek->curSetting.programmableDelay); |