Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236250
b: refs/heads/master
c: 480c28d
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Mar 3, 2011
1 parent 3fd8ea5 commit a53e198
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 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: cb2535ad49972ab2ef3c872958bcd20b9532a308
refs/heads/master: 480c28df902b5dd5947950aef39d167b5668d3fe
24 changes: 11 additions & 13 deletions trunk/drivers/staging/hv/hv_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ struct mousevsc_drv_obj {
* Beta, RC < 2008/1/22 1,0
* RC > 2008/1/22 2,0
*/
#define SYNTHHID_INPUT_VERSION_MAJOR 2
#define SYNTHHID_INPUT_VERSION_MINOR 0
#define SYNTHHID_INPUT_VERSION_DWORD (SYNTHHID_INPUT_VERSION_MINOR | \
(SYNTHHID_INPUT_VERSION_MAJOR << 16))
#define SYNTHHID_INPUT_VERSION_MAJOR 2
#define SYNTHHID_INPUT_VERSION_MINOR 0
#define SYNTHHID_INPUT_VERSION (SYNTHHID_INPUT_VERSION_MINOR | \
(SYNTHHID_INPUT_VERSION_MAJOR << 16))


#pragma pack(push,1)
Expand Down Expand Up @@ -94,24 +94,23 @@ struct synthhid_msg {

union synthhid_version {
struct {
u16 Minor;
u16 Major;
u16 minor_version;
u16 major_version;
};

u32 AsDWord;
u32 version;
};

/*
* Protocol messages
*/
struct synthhid_protocol_request {
struct synthhid_msg_hdr header;
union synthhid_version VersionRequested;
union synthhid_version version_requested;
};

struct synthhid_protocol_response {
struct synthhid_msg_hdr header;
union synthhid_version VersionRequested;
union synthhid_version version_requested;
unsigned char Approved;
};

Expand Down Expand Up @@ -611,8 +610,7 @@ static int MousevscConnectToVsp(struct hv_device *Device)

request->u.Request.header.type = SynthHidProtocolRequest;
request->u.Request.header.size = sizeof(unsigned long);
request->u.Request.VersionRequested.AsDWord =
SYNTHHID_INPUT_VERSION_DWORD;
request->u.Request.version_requested.version = SYNTHHID_INPUT_VERSION;

pr_info("synthhid protocol request...");

Expand All @@ -639,7 +637,7 @@ static int MousevscConnectToVsp(struct hv_device *Device)

if (!response->u.Response.Approved) {
pr_err("synthhid protocol request failed (version %d)",
SYNTHHID_INPUT_VERSION_DWORD);
SYNTHHID_INPUT_VERSION);
ret = -1;
goto Cleanup;
}
Expand Down

0 comments on commit a53e198

Please sign in to comment.