Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104968
b: refs/heads/master
c: 6f0168d
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and Jiri Kosina committed Jul 23, 2008
1 parent 2225255 commit e59e36b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9063974cdbc5463528cb6aa60c91bc0267af7bbb
refs/heads/master: 6f0168d2dacd7972d887e1ca27943ef8af7512a5
10 changes: 5 additions & 5 deletions trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
}

/*
Expand Down

0 comments on commit e59e36b

Please sign in to comment.