aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/snsc_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/snsc_event.c')
-rw-r--r--drivers/char/snsc_event.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c
index 1b75b0b7d542..31a7765eaf73 100644
--- a/drivers/char/snsc_event.c
+++ b/drivers/char/snsc_event.c
@@ -63,16 +63,13 @@ static int
63scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc) 63scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc)
64{ 64{
65 char *desc_end; 65 char *desc_end;
66 __be32 from_buf;
67 66
68 /* record event source address */ 67 /* record event source address */
69 from_buf = get_unaligned((__be32 *)event); 68 *src = get_unaligned_be32(event);
70 *src = be32_to_cpup(&from_buf);
71 event += 4; /* move on to event code */ 69 event += 4; /* move on to event code */
72 70
73 /* record the system controller's event code */ 71 /* record the system controller's event code */
74 from_buf = get_unaligned((__be32 *)event); 72 *code = get_unaligned_be32(event);
75 *code = be32_to_cpup(&from_buf);
76 event += 4; /* move on to event arguments */ 73 event += 4; /* move on to event arguments */
77 74
78 /* how many arguments are in the packet? */ 75 /* how many arguments are in the packet? */
@@ -86,8 +83,7 @@ scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc)
86 /* not an integer argument, so give up */ 83 /* not an integer argument, so give up */
87 return -1; 84 return -1;
88 } 85 }
89 from_buf = get_unaligned((__be32 *)event); 86 *esp_code = get_unaligned_be32(event);
90 *esp_code = be32_to_cpup(&from_buf);
91 event += 4; 87 event += 4;
92 88
93 /* parse out the event description */ 89 /* parse out the event description */