aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/gtco.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-04-29 04:03:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:27 -0400
commit858ad08cf4c32a51d26552d3cb5fa8d5e2f0e579 (patch)
tree032cb87cf448662e5d4ceb6b25af10aef19d8d99 /drivers/input/tablet/gtco.c
parent973ea70c7c9be50d5ac34ff82a1c48fbe8fb2efb (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/gtco.c')
-rw-r--r--drivers/input/tablet/gtco.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index f66ca215cdec..c5a8661a1baa 100644
--- a/drivers/input/tablet/gtco.c
+++ b/drivers/input/tablet/gtco.c
@@ -245,11 +245,11 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report,
245 data = report[i]; 245 data = report[i];
246 break; 246 break;
247 case 2: 247 case 2:
248 data16 = le16_to_cpu(get_unaligned((__le16 *)&report[i])); 248 data16 = get_unaligned_le16(&report[i]);
249 break; 249 break;
250 case 3: 250 case 3:
251 size = 4; 251 size = 4;
252 data32 = le32_to_cpu(get_unaligned((__le32 *)&report[i])); 252 data32 = get_unaligned_le32(&report[i]);
253 break; 253 break;
254 } 254 }
255 255
@@ -695,10 +695,10 @@ static void gtco_urb_callback(struct urb *urbinfo)
695 /* Fall thru */ 695 /* Fall thru */
696 case 1: 696 case 1:
697 /* All reports have X and Y coords in the same place */ 697 /* All reports have X and Y coords in the same place */
698 val = le16_to_cpu(get_unaligned((__le16 *)&device->buffer[1])); 698 val = get_unaligned_le16(&device->buffer[1]);
699 input_report_abs(inputdev, ABS_X, val); 699 input_report_abs(inputdev, ABS_X, val);
700 700
701 val = le16_to_cpu(get_unaligned((__le16 *)&device->buffer[3])); 701 val = get_unaligned_le16(&device->buffer[3]);
702 input_report_abs(inputdev, ABS_Y, val); 702 input_report_abs(inputdev, ABS_Y, val);
703 703
704 /* Ditto for proximity bit */ 704 /* Ditto for proximity bit */
@@ -762,7 +762,7 @@ static void gtco_urb_callback(struct urb *urbinfo)
762 le_buffer[1] = (u8)(device->buffer[4] >> 1); 762 le_buffer[1] = (u8)(device->buffer[4] >> 1);
763 le_buffer[1] |= (u8)((device->buffer[5] & 0x1) << 7); 763 le_buffer[1] |= (u8)((device->buffer[5] & 0x1) << 7);
764 764
765 val = le16_to_cpu(get_unaligned((__le16 *)le_buffer)); 765 val = get_unaligned_le16(le_buffer);
766 input_report_abs(inputdev, ABS_Y, val); 766 input_report_abs(inputdev, ABS_Y, val);
767 767
768 /* 768 /*
@@ -772,10 +772,10 @@ static void gtco_urb_callback(struct urb *urbinfo)
772 buttonbyte = device->buffer[5] >> 1; 772 buttonbyte = device->buffer[5] >> 1;
773 } else { 773 } else {
774 774
775 val = le16_to_cpu(get_unaligned((__le16 *)&device->buffer[1])); 775 val = get_unaligned_le16(&device->buffer[1]);
776 input_report_abs(inputdev, ABS_X, val); 776 input_report_abs(inputdev, ABS_X, val);
777 777
778 val = le16_to_cpu(get_unaligned((__le16 *)&device->buffer[3])); 778 val = get_unaligned_le16(&device->buffer[3]);
779 input_report_abs(inputdev, ABS_Y, val); 779 input_report_abs(inputdev, ABS_Y, val);
780 780
781 buttonbyte = device->buffer[5]; 781 buttonbyte = device->buffer[5];