Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352243
b: refs/heads/master
c: 52e0b01
h: refs/heads/master
i:
  352241: 219cb7d
  352239: 3a68e96
v: v3
  • Loading branch information
Gustavo Padovan committed Jan 10, 2013
1 parent 49b6af4 commit a6bf211
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 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: a1d704509d5b96756d3d4cfb7f10a555efeadb87
refs/heads/master: 52e0b011e29f36bc5c02ea3adbf4d864a38373de
22 changes: 11 additions & 11 deletions trunk/net/bluetooth/hci_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <linux/debugfs.h>
#include <linux/module.h>
#include <asm/unaligned.h>

#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
Expand Down Expand Up @@ -461,19 +462,18 @@ static const struct file_operations blacklist_fops = {

static void print_bt_uuid(struct seq_file *f, u8 *uuid)
{
__be32 data0, data4;
__be16 data1, data2, data3, data5;
u32 data0, data5;
u16 data1, data2, data3, data4;

memcpy(&data0, &uuid[0], 4);
memcpy(&data1, &uuid[4], 2);
memcpy(&data2, &uuid[6], 2);
memcpy(&data3, &uuid[8], 2);
memcpy(&data4, &uuid[10], 4);
memcpy(&data5, &uuid[14], 2);
data5 = get_unaligned_le32(uuid);
data4 = get_unaligned_le16(uuid + 4);
data3 = get_unaligned_le16(uuid + 6);
data2 = get_unaligned_le16(uuid + 8);
data1 = get_unaligned_le16(uuid + 10);
data0 = get_unaligned_le32(uuid + 12);

seq_printf(f, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x\n",
ntohl(data0), ntohs(data1), ntohs(data2), ntohs(data3),
ntohl(data4), ntohs(data5));
seq_printf(f, "%.8x-%.4x-%.4x-%.4x-%.4x%.8x\n",
data0, data1, data2, data3, data4, data5);
}

static int uuids_show(struct seq_file *f, void *p)
Expand Down

0 comments on commit a6bf211

Please sign in to comment.