aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/aiptek.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/tablet/aiptek.c')
-rw-r--r--drivers/input/tablet/aiptek.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 1d759f6f8076..55c1134d6137 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -528,9 +528,9 @@ static void aiptek_irq(struct urb *urb)
528 (aiptek->curSetting.pointerMode)) { 528 (aiptek->curSetting.pointerMode)) {
529 aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED; 529 aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED;
530 } else { 530 } else {
531 x = le16_to_cpu(get_unaligned((__le16 *) (data + 1))); 531 x = get_unaligned_le16(data + 1);
532 y = le16_to_cpu(get_unaligned((__le16 *) (data + 3))); 532 y = get_unaligned_le16(data + 3);
533 z = le16_to_cpu(get_unaligned((__le16 *) (data + 6))); 533 z = get_unaligned_le16(data + 6);
534 534
535 dv = (data[5] & 0x01) != 0 ? 1 : 0; 535 dv = (data[5] & 0x01) != 0 ? 1 : 0;
536 p = (data[5] & 0x02) != 0 ? 1 : 0; 536 p = (data[5] & 0x02) != 0 ? 1 : 0;
@@ -613,8 +613,8 @@ static void aiptek_irq(struct urb *urb)
613 (aiptek->curSetting.pointerMode)) { 613 (aiptek->curSetting.pointerMode)) {
614 aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED; 614 aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED;
615 } else { 615 } else {
616 x = le16_to_cpu(get_unaligned((__le16 *) (data + 1))); 616 x = get_unaligned_le16(data + 1);
617 y = le16_to_cpu(get_unaligned((__le16 *) (data + 3))); 617 y = get_unaligned_le16(data + 3);
618 618
619 jitterable = data[5] & 0x1c; 619 jitterable = data[5] & 0x1c;
620 620
@@ -679,7 +679,7 @@ static void aiptek_irq(struct urb *urb)
679 pck = (data[1] & aiptek->curSetting.stylusButtonUpper) != 0 ? 1 : 0; 679 pck = (data[1] & aiptek->curSetting.stylusButtonUpper) != 0 ? 1 : 0;
680 680
681 macro = dv && p && tip && !(data[3] & 1) ? (data[3] >> 1) : -1; 681 macro = dv && p && tip && !(data[3] & 1) ? (data[3] >> 1) : -1;
682 z = le16_to_cpu(get_unaligned((__le16 *) (data + 4))); 682 z = get_unaligned_le16(data + 4);
683 683
684 if (dv) { 684 if (dv) {
685 /* If the selected tool changed, reset the old 685 /* If the selected tool changed, reset the old
@@ -757,7 +757,7 @@ static void aiptek_irq(struct urb *urb)
757 * hat switches (which just so happen to be the macroKeys.) 757 * hat switches (which just so happen to be the macroKeys.)
758 */ 758 */
759 else if (data[0] == 6) { 759 else if (data[0] == 6) {
760 macro = le16_to_cpu(get_unaligned((__le16 *) (data + 1))); 760 macro = get_unaligned_le16(data + 1);
761 if (macro > 0) { 761 if (macro > 0) {
762 input_report_key(inputdev, macroKeyEvents[macro - 1], 762 input_report_key(inputdev, macroKeyEvents[macro - 1],
763 0); 763 0);
@@ -952,7 +952,7 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data)
952 buf[0], buf[1], buf[2]); 952 buf[0], buf[1], buf[2]);
953 ret = -EIO; 953 ret = -EIO;
954 } else { 954 } else {
955 ret = le16_to_cpu(get_unaligned((__le16 *) (buf + 1))); 955 ret = get_unaligned_le16(buf + 1);
956 } 956 }
957 kfree(buf); 957 kfree(buf);
958 return ret; 958 return ret;