Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6f9bec43
Commit
6f9bec43
authored
Aug 16, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass.sys: Remove unnecessary poll_interval == 0 cases.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
286999a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
44 deletions
+13
-44
device.c
dlls/hidclass.sys/device.c
+13
-44
No files found.
dlls/hidclass.sys/device.c
View file @
6f9bec43
...
...
@@ -32,7 +32,6 @@
#include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
hid
);
WINE_DECLARE_DEBUG_CHANNEL
(
hid_report
);
IRP
*
pop_irp_from_queue
(
BASE_DEVICE_EXTENSION
*
ext
)
{
...
...
@@ -282,8 +281,7 @@ static DWORD CALLBACK hid_device_thread(void *args)
hid_device_queue_input
(
device
,
packet
);
}
rc
=
WaitForSingleObject
(
ext
->
u
.
pdo
.
halt_event
,
ext
->
u
.
pdo
.
poll_interval
?
ext
->
u
.
pdo
.
poll_interval
:
DEFAULT_POLL_INTERVAL
);
rc
=
WaitForSingleObject
(
ext
->
u
.
pdo
.
halt_event
,
ext
->
u
.
pdo
.
poll_interval
);
if
(
rc
==
WAIT_OBJECT_0
)
break
;
...
...
@@ -616,7 +614,6 @@ NTSTATUS WINAPI pdo_read(DEVICE_OBJECT *device, IRP *irp)
BASE_DEVICE_EXTENSION
*
ext
=
device
->
DeviceExtension
;
struct
hid_preparsed_data
*
preparsed
=
ext
->
u
.
pdo
.
preparsed_data
;
IO_STACK_LOCATION
*
irpsp
=
IoGetCurrentIrpStackLocation
(
irp
);
BYTE
report_id
=
HID_INPUT_VALUE_CAPS
(
preparsed
)
->
report_id
;
struct
hid_report
*
report
;
NTSTATUS
status
;
BOOL
removed
;
...
...
@@ -650,50 +647,22 @@ NTSTATUS WINAPI pdo_read(DEVICE_OBJECT *device, IRP *irp)
}
else
{
if
(
ext
->
u
.
pdo
.
poll_interval
)
{
KIRQL
old_irql
;
TRACE_
(
hid_report
)(
"Queue irp
\n
"
);
KeAcquireSpinLock
(
&
ext
->
u
.
pdo
.
irp_queue_lock
,
&
old_irql
);
IoSetCancelRoutine
(
irp
,
read_cancel_routine
);
if
(
irp
->
Cancel
&&
!
IoSetCancelRoutine
(
irp
,
NULL
))
{
/* IRP was canceled before we set cancel routine */
InitializeListHead
(
&
irp
->
Tail
.
Overlay
.
ListEntry
);
KeReleaseSpinLock
(
&
ext
->
u
.
pdo
.
irp_queue_lock
,
old_irql
);
return
STATUS_CANCELLED
;
}
KeAcquireSpinLock
(
&
ext
->
u
.
pdo
.
irp_queue_lock
,
&
irql
);
InsertTailList
(
&
ext
->
u
.
pdo
.
irp_queue
,
&
irp
->
Tail
.
Overlay
.
ListEntry
);
irp
->
IoStatus
.
Status
=
STATUS_PENDING
;
IoMarkIrpPending
(
irp
);
KeReleaseSpinLock
(
&
ext
->
u
.
pdo
.
irp_queue_lock
,
old_irql
);
}
else
IoSetCancelRoutine
(
irp
,
read_cancel_routine
);
if
(
irp
->
Cancel
&&
!
IoSetCancelRoutine
(
irp
,
NULL
))
{
HID_XFER_PACKET
packet
;
BYTE
*
buffer
=
irp
->
AssociatedIrp
.
SystemBuffer
;
ULONG
buffer_len
=
irpsp
->
Parameters
.
Read
.
Length
;
TRACE
(
"No packet, but opportunistic reads enabled
\n
"
);
packet
.
reportId
=
buffer
[
0
];
packet
.
reportBuffer
=
buffer
;
packet
.
reportBufferLen
=
buffer_len
;
/* IRP was canceled before we set cancel routine */
InitializeListHead
(
&
irp
->
Tail
.
Overlay
.
ListEntry
);
KeReleaseSpinLock
(
&
ext
->
u
.
pdo
.
irp_queue_lock
,
irql
);
return
STATUS_CANCELLED
;
}
if
(
!
report_id
)
{
packet
.
reportId
=
0
;
packet
.
reportBuffer
++
;
packet
.
reportBufferLen
--
;
}
InsertTailList
(
&
ext
->
u
.
pdo
.
irp_queue
,
&
irp
->
Tail
.
Overlay
.
ListEntry
);
irp
->
IoStatus
.
Status
=
STATUS_PENDING
;
IoMarkIrpPending
(
irp
);
call_minidriver
(
IOCTL_HID_GET_INPUT_REPORT
,
ext
->
u
.
pdo
.
parent_fdo
,
NULL
,
0
,
&
packet
,
sizeof
(
packet
),
&
irp
->
IoStatus
);
}
KeReleaseSpinLock
(
&
ext
->
u
.
pdo
.
irp_queue_lock
,
irql
);
}
status
=
irp
->
IoStatus
.
Status
;
...
...
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