X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fhid%2Fhid-core.c;h=426ac5add585c03df6dbdae3c8b2baca175ef043;hb=d7b6de14a0ef8a376f9d57b867545b47302b7bfb;hp=f43d6d3cf2fa2429d5689bbe05e87cf0f99358e0;hpb=c2a3b233450d5bc426c063ea2d8a74351db29ea4;p=linux-2.6 diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f43d6d3cf2..426ac5add5 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -780,7 +780,7 @@ static __inline__ __u32 extract(__u8 *report, unsigned offset, unsigned n) */ static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value) { - __le64 x; + u64 x; u64 m = (1ULL << n) - 1; if (n > 32) @@ -796,10 +796,10 @@ static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u3 report += offset >> 3; offset &= 7; - x = get_unaligned((__le64 *)report); - x &= cpu_to_le64(~(m << offset)); - x |= cpu_to_le64(((u64) value) << offset); - put_unaligned(x, (__le64 *) report); + x = get_unaligned_le64(report); + x &= ~(m << offset); + x |= ((u64)value) << offset; + put_unaligned_le64(x, report); } /*