X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Firda%2Fdiscovery.c;h=c1c8ae939126027c5d3ddb6192d2da88677da419;hb=2f10ffcfb28beb35137d9e86992c771b4a6c5f2a;hp=bfacef8b76f44b6228e15b3025c3ea31d7d14ed4;hpb=36d99df2fb474222ab47fbe8ae7385661033223b;p=mv-sheeva.git diff --git a/net/irda/discovery.c b/net/irda/discovery.c index bfacef8b76f..c1c8ae93912 100644 --- a/net/irda/discovery.c +++ b/net/irda/discovery.c @@ -34,12 +34,15 @@ #include #include #include +#include #include #include #include +#include + /* * Function irlmp_add_discovery (cachelog, discovery) * @@ -87,7 +90,7 @@ void irlmp_add_discovery(hashbin_t *cachelog, discovery_t *new) */ hashbin_remove_this(cachelog, (irda_queue_t *) node); /* Check if hints bits are unchanged */ - if(u16ho(node->data.hints) == u16ho(new->data.hints)) + if (get_unaligned((__u16 *)node->data.hints) == get_unaligned((__u16 *)new->data.hints)) /* Set time of first discovery for this node */ new->firststamp = node->firststamp; kfree(node); @@ -281,9 +284,9 @@ struct irda_device_info *irlmp_copy_discoveries(hashbin_t *log, int *pn, /* Mask out the ones we don't want : * We want to match the discovery mask, and to get only * the most recent one (unless we want old ones) */ - if ((u16ho(discovery->data.hints) & mask) && + if ((get_unaligned((__u16 *)discovery->data.hints) & mask) && ((old_entries) || - ((jiffies - discovery->firststamp) < j_timeout)) ) { + ((jiffies - discovery->firststamp) < j_timeout))) { /* Create buffer as needed. * As this function get called a lot and most time * we don't have anything to put in the log (we are