Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ecfc6da8
Commit
ecfc6da8
authored
Oct 17, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: fix problem with removing a USB root hub.
parent
2343ef93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
drivers/usb/core/usb.c
drivers/usb/core/usb.c
+3
-1
No files found.
drivers/usb/core/usb.c
View file @
ecfc6da8
...
@@ -790,6 +790,7 @@ void usb_disconnect(struct usb_device **pdev)
...
@@ -790,6 +790,7 @@ void usb_disconnect(struct usb_device **pdev)
usb_disconnect
(
child
);
usb_disconnect
(
child
);
}
}
dbg
(
"unregistering interfaces on device %d"
,
dev
->
devnum
);
if
(
dev
->
actconfig
)
{
if
(
dev
->
actconfig
)
{
for
(
i
=
0
;
i
<
dev
->
actconfig
->
bNumInterfaces
;
i
++
)
{
for
(
i
=
0
;
i
<
dev
->
actconfig
->
bNumInterfaces
;
i
++
)
{
struct
usb_interface
*
interface
=
&
dev
->
actconfig
->
interface
[
i
];
struct
usb_interface
*
interface
=
&
dev
->
actconfig
->
interface
[
i
];
...
@@ -799,12 +800,13 @@ void usb_disconnect(struct usb_device **pdev)
...
@@ -799,12 +800,13 @@ void usb_disconnect(struct usb_device **pdev)
}
}
}
}
dbg
(
"unregistering the device %d"
,
dev
->
devnum
);
/* Free the device number and remove the /proc/bus/usb entry */
/* Free the device number and remove the /proc/bus/usb entry */
if
(
dev
->
devnum
>
0
)
{
if
(
dev
->
devnum
>
0
)
{
clear_bit
(
dev
->
devnum
,
dev
->
bus
->
devmap
.
devicemap
);
clear_bit
(
dev
->
devnum
,
dev
->
bus
->
devmap
.
devicemap
);
usbfs_remove_device
(
dev
);
usbfs_remove_device
(
dev
);
device_unregister
(
&
dev
->
dev
);
}
}
device_unregister
(
&
dev
->
dev
);
/* Decrement the reference count, it'll auto free everything when */
/* Decrement the reference count, it'll auto free everything when */
/* it hits 0 which could very well be now */
/* it hits 0 which could very well be now */
...
...
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