From fa003500ec7a057e555a1c80d68865d00fa8142c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 2 Mar 2011 17:53:58 -0800 Subject: [PATCH] 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 Cc: K. Y. Srinivasan Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/hv_mouse.c | 88 ++++++++++++++++- drivers/staging/hv/vmbus_hid_protocol.h | 120 ------------------------ 2 files changed, 87 insertions(+), 121 deletions(-) delete mode 100644 drivers/staging/hv/vmbus_hid_protocol.h diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c index 32fad7344321..b62409d22ce5 100644 --- a/drivers/staging/hv/hv_mouse.c +++ b/drivers/staging/hv/hv_mouse.c @@ -32,7 +32,93 @@ #include "mousevsc_api.h" #include "channel.h" #include "vmbus_packet_format.h" -#include "vmbus_hid_protocol.h" + + +/* The maximum size of a synthetic input message. */ +#define SYNTHHID_MAX_INPUT_REPORT_SIZE 16 + +/* + * Current version + * + * History: + * 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)) + + +#pragma pack(push,1) +/* + * Message types in the synthetic input protocol + */ +enum synthhid_msg_type { + SynthHidProtocolRequest, + SynthHidProtocolResponse, + SynthHidInitialDeviceInfo, + SynthHidInitialDeviceInfoAck, + SynthHidInputReport, + SynthHidMax +}; + +/* + * Basic message structures. + */ +typedef struct { + enum synthhid_msg_type Type; /* Type of the enclosed message */ + u32 Size; /* Size of the enclosed message + * (size of the data payload) + */ +} SYNTHHID_MESSAGE_HEADER, *PSYNTHHID_MESSAGE_HEADER; + +typedef struct { + SYNTHHID_MESSAGE_HEADER Header; + char Data[1]; /* Enclosed message */ +} SYNTHHID_MESSAGE, *PSYNTHHID_MESSAGE; + +typedef union { + struct { + u16 Minor; + u16 Major; + }; + + u32 AsDWord; +} SYNTHHID_VERSION, *PSYNTHHID_VERSION; + +/* + * Protocol messages + */ +typedef struct { + SYNTHHID_MESSAGE_HEADER Header; + SYNTHHID_VERSION VersionRequested; +} SYNTHHID_PROTOCOL_REQUEST, *PSYNTHHID_PROTOCOL_REQUEST; + +typedef struct { + SYNTHHID_MESSAGE_HEADER Header; + SYNTHHID_VERSION VersionRequested; + unsigned char Approved; +} SYNTHHID_PROTOCOL_RESPONSE, *PSYNTHHID_PROTOCOL_RESPONSE; + +typedef struct { + SYNTHHID_MESSAGE_HEADER Header; + struct input_dev_info HidDeviceAttributes; + unsigned char HidDescriptorInformation[1]; +} SYNTHHID_DEVICE_INFO, *PSYNTHHID_DEVICE_INFO; + +typedef struct { + SYNTHHID_MESSAGE_HEADER Header; + unsigned char Reserved; +} SYNTHHID_DEVICE_INFO_ACK, *PSYNTHHID_DEVICE_INFO_ACK; + +typedef struct { + SYNTHHID_MESSAGE_HEADER Header; + char ReportBuffer[1]; +} SYNTHHID_INPUT_REPORT, *PSYNTHHID_INPUT_REPORT; + +#pragma pack(pop) + #define NBITS(x) (((x)/BITS_PER_LONG)+1) diff --git a/drivers/staging/hv/vmbus_hid_protocol.h b/drivers/staging/hv/vmbus_hid_protocol.h deleted file mode 100644 index 65f3001e6202..000000000000 --- a/drivers/staging/hv/vmbus_hid_protocol.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2009, Microsoft Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place - Suite 330, Boston, MA 02111-1307 USA. - * - * Authors: - * Hank Janssen - */ -#ifndef _VMBUS_HID_PROTOCOL_ -#define _VMBUS_HID_PROTOCOL_ - -/* The maximum size of a synthetic input message. */ -#define SYNTHHID_MAX_INPUT_REPORT_SIZE 16 - -/* - * Current version - * - * History: - * 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)) - - -#pragma pack(push,1) - -/* - * Message types in the synthetic input protocol - */ -enum synthhid_msg_type -{ - SynthHidProtocolRequest, - SynthHidProtocolResponse, - SynthHidInitialDeviceInfo, - SynthHidInitialDeviceInfoAck, - SynthHidInputReport, - SynthHidMax -}; - - -/* - * Basic message structures. - */ -typedef struct -{ - enum synthhid_msg_type Type; /* Type of the enclosed message */ - u32 Size; /* Size of the enclosed message - * (size of the data payload) - */ -} SYNTHHID_MESSAGE_HEADER, *PSYNTHHID_MESSAGE_HEADER; - -typedef struct -{ - SYNTHHID_MESSAGE_HEADER Header; - char Data[1]; /* Enclosed message */ -} SYNTHHID_MESSAGE, *PSYNTHHID_MESSAGE; - -typedef union -{ - struct { - u16 Minor; - u16 Major; - }; - - u32 AsDWord; -} SYNTHHID_VERSION, *PSYNTHHID_VERSION; - -/* - * Protocol messages - */ -typedef struct -{ - SYNTHHID_MESSAGE_HEADER Header; - SYNTHHID_VERSION VersionRequested; -} SYNTHHID_PROTOCOL_REQUEST, *PSYNTHHID_PROTOCOL_REQUEST; - -typedef struct -{ - SYNTHHID_MESSAGE_HEADER Header; - SYNTHHID_VERSION VersionRequested; - unsigned char Approved; -} SYNTHHID_PROTOCOL_RESPONSE, *PSYNTHHID_PROTOCOL_RESPONSE; - -typedef struct -{ - SYNTHHID_MESSAGE_HEADER Header; - struct input_dev_info HidDeviceAttributes; - unsigned char HidDescriptorInformation[1]; -} SYNTHHID_DEVICE_INFO, *PSYNTHHID_DEVICE_INFO; - -typedef struct -{ - SYNTHHID_MESSAGE_HEADER Header; - unsigned char Reserved; -} SYNTHHID_DEVICE_INFO_ACK, *PSYNTHHID_DEVICE_INFO_ACK; - -typedef struct -{ - SYNTHHID_MESSAGE_HEADER Header; - char ReportBuffer[1]; -} SYNTHHID_INPUT_REPORT, *PSYNTHHID_INPUT_REPORT; - -#pragma pack(pop) - -#endif /* _VMBUS_HID_PROTOCOL_ */ - -- 2.20.1