Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
4970266a
Commit
4970266a
authored
Aug 20, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl: Factor out remove_device().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e56e4f97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
pnp.c
dlls/ntoskrnl.exe/pnp.c
+9
-9
No files found.
dlls/ntoskrnl.exe/pnp.c
View file @
4970266a
...
...
@@ -366,6 +366,12 @@ static void send_remove_device_irp( DEVICE_OBJECT *device, UCHAR code )
send_pnp_irp
(
device
,
code
);
}
static
void
remove_device
(
DEVICE_OBJECT
*
device
)
{
send_remove_device_irp
(
device
,
IRP_MN_SURPRISE_REMOVAL
);
send_remove_device_irp
(
device
,
IRP_MN_REMOVE_DEVICE
);
}
static
BOOL
device_in_list
(
const
DEVICE_RELATIONS
*
list
,
const
DEVICE_OBJECT
*
device
)
{
ULONG
i
;
...
...
@@ -440,8 +446,7 @@ static void handle_bus_relations( DEVICE_OBJECT *parent )
if
(
!
device_in_list
(
relations
,
child
))
{
TRACE
(
"Removing device %p.
\n
"
,
child
);
send_remove_device_irp
(
child
,
IRP_MN_SURPRISE_REMOVAL
);
send_remove_device_irp
(
child
,
IRP_MN_REMOVE_DEVICE
);
remove_device
(
child
);
}
ObDereferenceObject
(
child
);
}
...
...
@@ -1105,10 +1110,7 @@ void pnp_manager_stop_driver( struct wine_driver *driver )
struct
root_pnp_device
*
device
,
*
next
;
LIST_FOR_EACH_ENTRY_SAFE
(
device
,
next
,
&
driver
->
root_pnp_devices
,
struct
root_pnp_device
,
entry
)
{
send_remove_device_irp
(
device
->
device
,
IRP_MN_SURPRISE_REMOVAL
);
send_remove_device_irp
(
device
->
device
,
IRP_MN_REMOVE_DEVICE
);
}
remove_device
(
device
->
device
);
}
void
pnp_manager_stop
(
void
)
...
...
@@ -1181,9 +1183,7 @@ void CDECL wine_enumerate_root_devices( const WCHAR *driver_name )
LIST_FOR_EACH_ENTRY_SAFE
(
pnp_device
,
next
,
&
driver
->
root_pnp_devices
,
struct
root_pnp_device
,
entry
)
{
TRACE
(
"Removing device %s.
\n
"
,
debugstr_w
(
pnp_device
->
id
));
send_remove_device_irp
(
pnp_device
->
device
,
IRP_MN_SURPRISE_REMOVAL
);
send_remove_device_irp
(
pnp_device
->
device
,
IRP_MN_REMOVE_DEVICE
);
remove_device
(
pnp_device
->
device
);
}
list_move_head
(
&
driver
->
root_pnp_devices
,
&
new_list
);
...
...
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