summaryrefslogtreecommitdiffstats
path: root/drivers/char/snsc_event.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-04-29 01:03:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 08:06:27 -0700
commit973ea70c7c9be50d5ac34ff82a1c48fbe8fb2efb (patch)
tree247e411de49b0ec7301e7715e29d27ad741c3590 /drivers/char/snsc_event.c
parentc105068f2b35343eecf2bf16ee29a362b6121fa3 (diff)
downloadblackbird-op-linux-973ea70c7c9be50d5ac34ff82a1c48fbe8fb2efb.tar.gz
blackbird-op-linux-973ea70c7c9be50d5ac34ff82a1c48fbe8fb2efb.zip
char: use get_unaligned_* helpers
Remove unnecessary temp variable from_buf in snsc_event.c Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Jiri Slaby <jirislaby@gmail.com> 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/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
scdrv_parse_event(char *event, int *src, int *code, int *esp_code, char *desc)
{
char *desc_end;
- __be32 from_buf;
/* record event source address */
- from_buf = get_unaligned((__be32 *)event);
- *src = be32_to_cpup(&from_buf);
+ *src = get_unaligned_be32(event);
event += 4; /* move on to event code */
/* record the system controller's event code */
- from_buf = get_unaligned((__be32 *)event);
- *code = be32_to_cpup(&from_buf);
+ *code = get_unaligned_be32(event);
event += 4; /* move on to event arguments */
/* 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)
/* not an integer argument, so give up */
return -1;
}
- from_buf = get_unaligned((__be32 *)event);
- *esp_code = be32_to_cpup(&from_buf);
+ *esp_code = get_unaligned_be32(event);
event += 4;
/* parse out the event description */
OpenPOWER on IntegriCloud