Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325165
b: refs/heads/master
c: 0b0f3a1
h: refs/heads/master
i:
  325163: e07542e
v: v3
  • Loading branch information
Jens Taprogge authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent 8ba0a41 commit b2a1df5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb12d88bf5f07a5aac77bebdfcb8a77ade48964e
refs/heads/master: 0b0f3a1bee7f321b92ffc37d8b32d1ce412a285c
6 changes: 6 additions & 0 deletions trunk/drivers/staging/ipack/ipack.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,21 @@ static void ipack_parse_id1(struct ipack_device *dev)

dev->id_vendor = id[4];
dev->id_device = id[5];
dev->speed_8mhz = 1;
dev->speed_32mhz = (id[7] == 'H');
}

static void ipack_parse_id2(struct ipack_device *dev)
{
__be16 *id = (__be16 *) dev->id;
u16 flags;

dev->id_vendor = ((be16_to_cpu(id[3]) & 0xff) << 16)
+ be16_to_cpu(id[4]);
dev->id_device = be16_to_cpu(id[5]);
flags = be16_to_cpu(id[10]);
dev->speed_8mhz = !!(flags & 2);
dev->speed_32mhz = !!(flags & 4);
}

static int ipack_device_read_id(struct ipack_device *dev)
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/staging/ipack/ipack.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ struct ipack_device {
u32 id_vendor;
u32 id_device;
u8 id_format;
unsigned int speed_8mhz:1;
unsigned int speed_32mhz:1;
};

/**
Expand Down

0 comments on commit b2a1df5

Please sign in to comment.