aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-03-02 20:53:58 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-02 20:53:58 -0500
commitfa003500ec7a057e555a1c80d68865d00fa8142c (patch)
tree263cbf491c58d18e29fcc1f3577810f33caed6dd
parent9b9f93da1fdb133a2de88c22670d6c39b3634eb5 (diff)
Staging: hv: delete vmbus_hid_protocol.h
The .h file is not needed as only one .c file uses it, so just move it into that file. Cc: Hank Janssen <hjanssen@microsoft.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/hv/hv_mouse.c88
-rw-r--r--drivers/staging/hv/vmbus_hid_protocol.h120
2 files changed, 87 insertions, 121 deletions
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 32fad734432..b62409d22ce 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -32,7 +32,93 @@
32#include "mousevsc_api.h" 32#include "mousevsc_api.h"
33#include "channel.h" 33#include "channel.h"
34#include "vmbus_packet_format.h" 34#include "vmbus_packet_format.h"
35#include "vmbus_hid_protocol.h" 35
36
37/* The maximum size of a synthetic input message. */
38#define SYNTHHID_MAX_INPUT_REPORT_SIZE 16
39
40/*
41 * Current version
42 *
43 * History:
44 * Beta, RC < 2008/1/22 1,0
45 * RC > 2008/1/22 2,0
46 */
47#define SYNTHHID_INPUT_VERSION_MAJOR 2
48#define SYNTHHID_INPUT_VERSION_MINOR 0
49#define SYNTHHID_INPUT_VERSION_DWORD (SYNTHHID_INPUT_VERSION_MINOR | \
50 (SYNTHHID_INPUT_VERSION_MAJOR << 16))
51
52
53#pragma pack(push,1)
54/*
55 * Message types in the synthetic input protocol
56 */
57enum synthhid_msg_type {
58 SynthHidProtocolRequest,
59 SynthHidProtocolResponse,
60 SynthHidInitialDeviceInfo,
61 SynthHidInitialDeviceInfoAck,
62 SynthHidInputReport,
63 SynthHidMax
64};
65
66/*
67 * Basic message structures.
68 */
69typedef struct {
70 enum synthhid_msg_type Type; /* Type of the enclosed message */
71 u32 Size; /* Size of the enclosed message
72 * (size of the data payload)
73 */
74} SYNTHHID_MESSAGE_HEADER, *PSYNTHHID_MESSAGE_HEADER;
75
76typedef struct {
77 SYNTHHID_MESSAGE_HEADER Header;
78 char Data[1]; /* Enclosed message */
79} SYNTHHID_MESSAGE, *PSYNTHHID_MESSAGE;
80
81typedef union {
82 struct {
83 u16 Minor;
84 u16 Major;
85 };
86
87 u32 AsDWord;
88} SYNTHHID_VERSION, *PSYNTHHID_VERSION;
89
90/*
91 * Protocol messages
92 */
93typedef struct {
94 SYNTHHID_MESSAGE_HEADER Header;
95 SYNTHHID_VERSION VersionRequested;
96} SYNTHHID_PROTOCOL_REQUEST, *PSYNTHHID_PROTOCOL_REQUEST;
97
98typedef struct {
99 SYNTHHID_MESSAGE_HEADER Header;
100 SYNTHHID_VERSION VersionRequested;
101 unsigned char Approved;
102} SYNTHHID_PROTOCOL_RESPONSE, *PSYNTHHID_PROTOCOL_RESPONSE;
103
104typedef struct {
105 SYNTHHID_MESSAGE_HEADER Header;
106 struct input_dev_info HidDeviceAttributes;
107 unsigned char HidDescriptorInformation[1];
108} SYNTHHID_DEVICE_INFO, *PSYNTHHID_DEVICE_INFO;
109
110typedef struct {
111 SYNTHHID_MESSAGE_HEADER Header;
112 unsigned char Reserved;
113} SYNTHHID_DEVICE_INFO_ACK, *PSYNTHHID_DEVICE_INFO_ACK;
114
115typedef struct {
116 SYNTHHID_MESSAGE_HEADER Header;
117 char ReportBuffer[1];
118} SYNTHHID_INPUT_REPORT, *PSYNTHHID_INPUT_REPORT;
119
120#pragma pack(pop)
121
36 122
37#define NBITS(x) (((x)/BITS_PER_LONG)+1) 123#define NBITS(x) (((x)/BITS_PER_LONG)+1)
38 124
diff --git a/drivers/staging/hv/vmbus_hid_protocol.h b/drivers/staging/hv/vmbus_hid_protocol.h
deleted file mode 100644
index 65f3001e620..00000000000
--- a/drivers/staging/hv/vmbus_hid_protocol.h
+++ /dev/null
@@ -1,120 +0,0 @@
1/*
2 * Copyright (c) 2009, Microsoft Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
16 *
17 * Authors:
18 * Hank Janssen <hjanssen@microsoft.com>
19 */
20#ifndef _VMBUS_HID_PROTOCOL_
21#define _VMBUS_HID_PROTOCOL_
22
23/* The maximum size of a synthetic input message. */
24#define SYNTHHID_MAX_INPUT_REPORT_SIZE 16
25
26/*
27 * Current version
28 *
29 * History:
30 * Beta, RC < 2008/1/22 1,0
31 * RC > 2008/1/22 2,0
32 */
33#define SYNTHHID_INPUT_VERSION_MAJOR 2
34#define SYNTHHID_INPUT_VERSION_MINOR 0
35#define SYNTHHID_INPUT_VERSION_DWORD (SYNTHHID_INPUT_VERSION_MINOR | \
36 (SYNTHHID_INPUT_VERSION_MAJOR << 16))
37
38
39#pragma pack(push,1)
40
41/*
42 * Message types in the synthetic input protocol
43 */
44enum synthhid_msg_type
45{
46 SynthHidProtocolRequest,
47 SynthHidProtocolResponse,
48 SynthHidInitialDeviceInfo,
49 SynthHidInitialDeviceInfoAck,
50 SynthHidInputReport,
51 SynthHidMax
52};
53
54
55/*
56 * Basic message structures.
57 */
58typedef struct
59{
60 enum synthhid_msg_type Type; /* Type of the enclosed message */
61 u32 Size; /* Size of the enclosed message
62 * (size of the data payload)
63 */
64} SYNTHHID_MESSAGE_HEADER, *PSYNTHHID_MESSAGE_HEADER;
65
66typedef struct
67{
68 SYNTHHID_MESSAGE_HEADER Header;
69 char Data[1]; /* Enclosed message */
70} SYNTHHID_MESSAGE, *PSYNTHHID_MESSAGE;
71
72typedef union
73{
74 struct {
75 u16 Minor;
76 u16 Major;
77 };
78
79 u32 AsDWord;
80} SYNTHHID_VERSION, *PSYNTHHID_VERSION;
81
82/*
83 * Protocol messages
84 */
85typedef struct
86{
87 SYNTHHID_MESSAGE_HEADER Header;
88 SYNTHHID_VERSION VersionRequested;
89} SYNTHHID_PROTOCOL_REQUEST, *PSYNTHHID_PROTOCOL_REQUEST;
90
91typedef struct
92{
93 SYNTHHID_MESSAGE_HEADER Header;
94 SYNTHHID_VERSION VersionRequested;
95 unsigned char Approved;
96} SYNTHHID_PROTOCOL_RESPONSE, *PSYNTHHID_PROTOCOL_RESPONSE;
97
98typedef struct
99{
100 SYNTHHID_MESSAGE_HEADER Header;
101 struct input_dev_info HidDeviceAttributes;
102 unsigned char HidDescriptorInformation[1];
103} SYNTHHID_DEVICE_INFO, *PSYNTHHID_DEVICE_INFO;
104
105typedef struct
106{
107 SYNTHHID_MESSAGE_HEADER Header;
108 unsigned char Reserved;
109} SYNTHHID_DEVICE_INFO_ACK, *PSYNTHHID_DEVICE_INFO_ACK;
110
111typedef struct
112{
113 SYNTHHID_MESSAGE_HEADER Header;
114 char ReportBuffer[1];
115} SYNTHHID_INPUT_REPORT, *PSYNTHHID_INPUT_REPORT;
116
117#pragma pack(pop)
118
119#endif /* _VMBUS_HID_PROTOCOL_ */
120