diff options
Diffstat (limited to 'net/irda')
-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 */ |