diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-05-02 19:21:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-02 19:21:52 -0400 |
commit | 260ffeed3fd185d29f08e98fb47c09e71bb59cd8 (patch) | |
tree | 869c0c04e0d6fc6d214e8494837854ea8d0da183 /net/irda/iriap.c | |
parent | b4192bbd85d29eb3bec7f9297d6464250e6a7a90 (diff) |
irda: use get_unaligned_* helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/iriap.c')
-rw-r--r-- | net/irda/iriap.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/irda/iriap.c b/net/irda/iriap.c index 9e15c82960fe..4a105dc32dcd 100644 --- a/net/irda/iriap.c +++ b/net/irda/iriap.c | |||
@@ -451,12 +451,14 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, | |||
451 | n = 2; | 451 | n = 2; |
452 | 452 | ||
453 | /* Get length, MSB first */ | 453 | /* Get length, MSB first */ |
454 | len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2; | 454 | len = get_unaligned_be16(fp + n); |
455 | n += 2; | ||
455 | 456 | ||
456 | IRDA_DEBUG(4, "%s(), len=%d\n", __func__, len); | 457 | IRDA_DEBUG(4, "%s(), len=%d\n", __func__, len); |
457 | 458 | ||
458 | /* Get object ID, MSB first */ | 459 | /* Get object ID, MSB first */ |
459 | obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2; | 460 | obj_id = get_unaligned_be16(fp + n); |
461 | n += 2; | ||
460 | 462 | ||
461 | type = fp[n++]; | 463 | type = fp[n++]; |
462 | IRDA_DEBUG(4, "%s(), Value type = %d\n", __func__, type); | 464 | IRDA_DEBUG(4, "%s(), Value type = %d\n", __func__, type); |
@@ -506,7 +508,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self, | |||
506 | value = irias_new_string_value(fp+n); | 508 | value = irias_new_string_value(fp+n); |
507 | break; | 509 | break; |
508 | case IAS_OCT_SEQ: | 510 | case IAS_OCT_SEQ: |
509 | value_len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); | 511 | value_len = get_unaligned_be16(fp + n); |
510 | n += 2; | 512 | n += 2; |
511 | 513 | ||
512 | /* Will truncate to IAS_MAX_OCTET_STRING bytes */ | 514 | /* Will truncate to IAS_MAX_OCTET_STRING bytes */ |