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
84e3e1b0
Commit
84e3e1b0
authored
Apr 17, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: fix oops in usb_hotplug for root devices
parent
59368b68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
drivers/usb/core/usb.c
drivers/usb/core/usb.c
+7
-2
No files found.
drivers/usb/core/usb.c
View file @
84e3e1b0
...
...
@@ -11,7 +11,7 @@
more docs, etc)
* (C) Copyright Yggdrasil Computing, Inc. 2000
* (usb_device_id matching changes by Adam J. Richter)
* (C) Copyright Greg Kroah-Hartman 2002
* (C) Copyright Greg Kroah-Hartman 2002
-2003
*
* NOTE! This is not actually a driver at all, rather this is
* just a collection of helper routines that implement the
...
...
@@ -76,6 +76,8 @@ static struct device_driver usb_generic_driver = {
.
remove
=
generic_remove
,
};
static
int
usb_generic_driver_data
;
/* needs to be called with BKL held */
int
usb_device_probe
(
struct
device
*
dev
)
{
...
...
@@ -535,7 +537,9 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
if
(
!
dev
)
return
-
ENODEV
;
if
(
dev
->
driver
==
&
usb_generic_driver
)
/* Must check driver_data here, as on remove driver is always NULL */
if
((
dev
->
driver
==
&
usb_generic_driver
)
||
(
dev
->
driver_data
==
&
usb_generic_driver_data
))
return
0
;
intf
=
to_usb_interface
(
dev
);
...
...
@@ -994,6 +998,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
dev
->
dev
.
driver
=
&
usb_generic_driver
;
dev
->
dev
.
bus
=
&
usb_bus_type
;
dev
->
dev
.
release
=
usb_release_dev
;
dev
->
dev
.
driver_data
=
&
usb_generic_driver_data
;
usb_get_dev
(
dev
);
if
(
dev
->
dev
.
bus_id
[
0
]
==
0
)
sprintf
(
&
dev
->
dev
.
bus_id
[
0
],
"%d-%s"
,
...
...
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