diff options
author | Len Brown <len.brown@intel.com> | 2005-09-03 02:44:09 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-03 02:44:09 -0400 |
commit | 129521dcc94f781890f8f668219ab79f0073ff9f (patch) | |
tree | 9f70707c88da65577f38814fe37b24c4b4957d64 /drivers/char/snsc_event.c | |
parent | 824b558bbe2c298b165cdb54c33718994dda30bb (diff) | |
parent | f505380ba7b98ec97bf25300c2a58aeae903530b (diff) |
Merge linux-2.6 into linux-acpi-2.6 test
Diffstat (limited to 'drivers/char/snsc_event.c')
-rw-r--r-- | drivers/char/snsc_event.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c index d692af57213a..baaa365285fa 100644 --- a/drivers/char/snsc_event.c +++ b/drivers/char/snsc_event.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/byteorder/generic.h> | 20 | #include <linux/byteorder/generic.h> |
21 | #include <asm/sn/sn_sal.h> | 21 | #include <asm/sn/sn_sal.h> |
22 | #include <asm/unaligned.h> | ||
22 | #include "snsc.h" | 23 | #include "snsc.h" |
23 | 24 | ||
24 | static struct subch_data_s *event_sd; | 25 | static struct subch_data_s *event_sd; |
@@ -62,13 +63,16 @@ static int | |||
62 | scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc) | 63 | scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc) |
63 | { | 64 | { |
64 | char *desc_end; | 65 | char *desc_end; |
66 | __be32 from_buf; | ||
65 | 67 | ||
66 | /* record event source address */ | 68 | /* record event source address */ |
67 | *src = be32_to_cpup((__be32 *)event); | 69 | from_buf = get_unaligned((__be32 *)event); |
70 | *src = be32_to_cpup(&from_buf); | ||
68 | event += 4; /* move on to event code */ | 71 | event += 4; /* move on to event code */ |
69 | 72 | ||
70 | /* record the system controller's event code */ | 73 | /* record the system controller's event code */ |
71 | *code = be32_to_cpup((__be32 *)event); | 74 | from_buf = get_unaligned((__be32 *)event); |
75 | *code = be32_to_cpup(&from_buf); | ||
72 | event += 4; /* move on to event arguments */ | 76 | event += 4; /* move on to event arguments */ |
73 | 77 | ||
74 | /* how many arguments are in the packet? */ | 78 | /* how many arguments are in the packet? */ |
@@ -82,7 +86,8 @@ scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc) | |||
82 | /* not an integer argument, so give up */ | 86 | /* not an integer argument, so give up */ |
83 | return -1; | 87 | return -1; |
84 | } | 88 | } |
85 | *esp_code = be32_to_cpup((__be32 *)event); | 89 | from_buf = get_unaligned((__be32 *)event); |
90 | *esp_code = be32_to_cpup(&from_buf); | ||
86 | event += 4; | 91 | event += 4; |
87 | 92 | ||
88 | /* parse out the event description */ | 93 | /* parse out the event description */ |