diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-04-29 04:03:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:27 -0400 |
commit | 858ad08cf4c32a51d26552d3cb5fa8d5e2f0e579 (patch) | |
tree | 032cb87cf448662e5d4ceb6b25af10aef19d8d99 /drivers/input/tablet/aiptek.c | |
parent | 973ea70c7c9be50d5ac34ff82a1c48fbe8fb2efb (diff) |
input: use get_unaligned_* helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/input/tablet/aiptek.c')
-rw-r--r-- | drivers/input/tablet/aiptek.c | 16 |
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; |