Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b6409950
Commit
b6409950
authored
Apr 14, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Rename "report_cs" to "cs".
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
092c7a09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
main.c
dlls/winebus.sys/main.c
+17
-16
No files found.
dlls/winebus.sys/main.c
View file @
b6409950
...
...
@@ -112,6 +112,8 @@ struct pnp_device
struct
device_extension
{
CRITICAL_SECTION
cs
;
struct
pnp_device
*
pnp_device
;
WORD
vid
,
pid
,
input
;
...
...
@@ -127,7 +129,6 @@ struct device_extension
BOOL
last_report_read
;
DWORD
buffer_size
;
LIST_ENTRY
irp_queue
;
CRITICAL_SECTION
report_cs
;
BYTE
platform_private
[
1
];
};
...
...
@@ -285,8 +286,8 @@ DEVICE_OBJECT *bus_create_hid_device(const WCHAR *busidW, WORD vid, WORD pid,
memset
(
ext
->
platform_private
,
0
,
platform_data_size
);
InitializeListHead
(
&
ext
->
irp_queue
);
InitializeCriticalSection
(
&
ext
->
report_
cs
);
ext
->
report_cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": report_
cs"
);
InitializeCriticalSection
(
&
ext
->
cs
);
ext
->
cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
":
cs"
);
/* add to list of pnp devices */
pnp_dev
->
device
=
device
;
...
...
@@ -366,7 +367,7 @@ void bus_remove_hid_device(DEVICE_OBJECT *device)
TRACE
(
"(%p)
\n
"
,
device
);
/* Cancel pending IRPs */
EnterCriticalSection
(
&
ext
->
report_
cs
);
EnterCriticalSection
(
&
ext
->
cs
);
while
((
entry
=
RemoveHeadList
(
&
ext
->
irp_queue
))
!=
&
ext
->
irp_queue
)
{
irp
=
CONTAINING_RECORD
(
entry
,
IRP
,
Tail
.
Overlay
.
s
.
ListEntry
);
...
...
@@ -374,10 +375,10 @@ void bus_remove_hid_device(DEVICE_OBJECT *device)
irp
->
IoStatus
.
Information
=
0
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
}
LeaveCriticalSection
(
&
ext
->
report_
cs
);
LeaveCriticalSection
(
&
ext
->
cs
);
ext
->
report_
cs
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
ext
->
report_
cs
);
ext
->
cs
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
ext
->
cs
);
HeapFree
(
GetProcessHeap
(),
0
,
ext
->
serial
);
HeapFree
(
GetProcessHeap
(),
0
,
ext
->
last_report
);
...
...
@@ -783,12 +784,12 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp)
{
HID_XFER_PACKET
*
packet
=
(
HID_XFER_PACKET
*
)(
irp
->
UserBuffer
);
TRACE_
(
hid_report
)(
"IOCTL_HID_GET_INPUT_REPORT
\n
"
);
EnterCriticalSection
(
&
ext
->
report_
cs
);
EnterCriticalSection
(
&
ext
->
cs
);
status
=
ext
->
vtbl
->
begin_report_processing
(
device
);
if
(
status
!=
STATUS_SUCCESS
)
{
irp
->
IoStatus
.
u
.
Status
=
status
;
LeaveCriticalSection
(
&
ext
->
report_
cs
);
LeaveCriticalSection
(
&
ext
->
cs
);
break
;
}
...
...
@@ -798,18 +799,18 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp)
if
(
status
==
STATUS_SUCCESS
)
packet
->
reportBufferLen
=
irp
->
IoStatus
.
Information
;
LeaveCriticalSection
(
&
ext
->
report_
cs
);
LeaveCriticalSection
(
&
ext
->
cs
);
break
;
}
case
IOCTL_HID_READ_REPORT
:
{
TRACE_
(
hid_report
)(
"IOCTL_HID_READ_REPORT
\n
"
);
EnterCriticalSection
(
&
ext
->
report_
cs
);
EnterCriticalSection
(
&
ext
->
cs
);
status
=
ext
->
vtbl
->
begin_report_processing
(
device
);
if
(
status
!=
STATUS_SUCCESS
)
{
irp
->
IoStatus
.
u
.
Status
=
status
;
LeaveCriticalSection
(
&
ext
->
report_
cs
);
LeaveCriticalSection
(
&
ext
->
cs
);
break
;
}
if
(
!
ext
->
last_report_read
)
...
...
@@ -824,7 +825,7 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp)
InsertTailList
(
&
ext
->
irp_queue
,
&
irp
->
Tail
.
Overlay
.
s
.
ListEntry
);
status
=
STATUS_PENDING
;
}
LeaveCriticalSection
(
&
ext
->
report_
cs
);
LeaveCriticalSection
(
&
ext
->
cs
);
break
;
}
case
IOCTL_HID_SET_OUTPUT_REPORT
:
...
...
@@ -880,7 +881,7 @@ void process_hid_report(DEVICE_OBJECT *device, BYTE *report, DWORD length)
if
(
!
length
||
!
report
)
return
;
EnterCriticalSection
(
&
ext
->
report_
cs
);
EnterCriticalSection
(
&
ext
->
cs
);
if
(
length
>
ext
->
buffer_size
)
{
HeapFree
(
GetProcessHeap
(),
0
,
ext
->
last_report
);
...
...
@@ -891,7 +892,7 @@ void process_hid_report(DEVICE_OBJECT *device, BYTE *report, DWORD length)
ext
->
buffer_size
=
0
;
ext
->
last_report_size
=
0
;
ext
->
last_report_read
=
TRUE
;
LeaveCriticalSection
(
&
ext
->
report_
cs
);
LeaveCriticalSection
(
&
ext
->
cs
);
return
;
}
else
...
...
@@ -914,7 +915,7 @@ void process_hid_report(DEVICE_OBJECT *device, BYTE *report, DWORD length)
ext
->
last_report_read
=
TRUE
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
}
LeaveCriticalSection
(
&
ext
->
report_
cs
);
LeaveCriticalSection
(
&
ext
->
cs
);
}
DWORD
check_bus_option
(
const
UNICODE_STRING
*
option
,
DWORD
default_value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment