struct pipe_prt_msg {
enum pipe_prot_msg_type type;
- u32 DataSize;
+ u32 size;
char Data[1];
};
*/
struct mousevsc_prt_msg {
enum pipe_prot_msg_type type;
- u32 DataSize;
+ u32 size;
union {
struct synthhid_protocol_request Request;
struct synthhid_protocol_response Response;
memset(&ack, sizeof(struct mousevsc_prt_msg), 0);
ack.type = PipeMessageData;
- ack.DataSize = sizeof(struct synthhid_device_info_ack);
+ ack.size = sizeof(struct synthhid_device_info_ack);
ack.Ack.header.type = SynthHidInitialDeviceInfoAck;
ack.Ack.header.size = 1;
if (pipeMsg->type != PipeMessageData) {
pr_err("unknown pipe msg type - type %d len %d",
- pipeMsg->type, pipeMsg->DataSize);
+ pipeMsg->type, pipeMsg->size);
PutInputDevice(Device);
return ;
}
switch (hidMsg->header.type) {
case SynthHidProtocolResponse:
- memcpy(&inputDevice->ProtocolResp, pipeMsg, pipeMsg->DataSize+sizeof(struct pipe_prt_msg) - sizeof(unsigned char));
+ memcpy(&inputDevice->ProtocolResp, pipeMsg,
+ pipeMsg->size + sizeof(struct pipe_prt_msg) -
+ sizeof(unsigned char));
inputDevice->protocol_wait_condition = 1;
wake_up(&inputDevice->ProtocolWaitEvent);
break;
case SynthHidInitialDeviceInfo:
- WARN_ON(pipeMsg->DataSize >= sizeof(struct hv_input_dev_info));
+ WARN_ON(pipeMsg->size >= sizeof(struct hv_input_dev_info));
/*
* Parse out the device info into device attr,
memset(request, sizeof(struct mousevsc_prt_msg), 0);
request->type = PipeMessageData;
- request->DataSize = sizeof(struct synthhid_protocol_request);
+ request->size = sizeof(struct synthhid_protocol_request);
request->Request.header.type = SynthHidProtocolRequest;
request->Request.header.size = sizeof(unsigned long);