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
8f44d827
Commit
8f44d827
authored
Sep 15, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: fix oops when trying to suspend and resume.
Thanks to Pavel for the original version of this patch.
parent
7140df08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
drivers/usb/core/usb.c
drivers/usb/core/usb.c
+6
-4
No files found.
drivers/usb/core/usb.c
View file @
8f44d827
...
@@ -1424,14 +1424,15 @@ static int usb_device_suspend(struct device *dev, u32 state)
...
@@ -1424,14 +1424,15 @@ static int usb_device_suspend(struct device *dev, u32 state)
struct
usb_interface
*
intf
;
struct
usb_interface
*
intf
;
struct
usb_driver
*
driver
;
struct
usb_driver
*
driver
;
if
((
dev
->
driver
==
&
usb_generic_driver
)
||
if
((
dev
->
driver
==
NULL
)
||
(
dev
->
driver
==
&
usb_generic_driver
)
||
(
dev
->
driver_data
==
&
usb_generic_driver_data
))
(
dev
->
driver_data
==
&
usb_generic_driver_data
))
return
0
;
return
0
;
intf
=
to_usb_interface
(
dev
);
intf
=
to_usb_interface
(
dev
);
driver
=
to_usb_driver
(
dev
->
driver
);
driver
=
to_usb_driver
(
dev
->
driver
);
if
(
driver
&&
driver
->
suspend
)
if
(
driver
->
suspend
)
return
driver
->
suspend
(
intf
,
state
);
return
driver
->
suspend
(
intf
,
state
);
return
0
;
return
0
;
}
}
...
@@ -1441,14 +1442,15 @@ static int usb_device_resume(struct device *dev)
...
@@ -1441,14 +1442,15 @@ static int usb_device_resume(struct device *dev)
struct
usb_interface
*
intf
;
struct
usb_interface
*
intf
;
struct
usb_driver
*
driver
;
struct
usb_driver
*
driver
;
if
((
dev
->
driver
==
&
usb_generic_driver
)
||
if
((
dev
->
driver
==
NULL
)
||
(
dev
->
driver
==
&
usb_generic_driver
)
||
(
dev
->
driver_data
==
&
usb_generic_driver_data
))
(
dev
->
driver_data
==
&
usb_generic_driver_data
))
return
0
;
return
0
;
intf
=
to_usb_interface
(
dev
);
intf
=
to_usb_interface
(
dev
);
driver
=
to_usb_driver
(
dev
->
driver
);
driver
=
to_usb_driver
(
dev
->
driver
);
if
(
driver
&&
driver
->
resume
)
if
(
driver
->
resume
)
return
driver
->
resume
(
intf
);
return
driver
->
resume
(
intf
);
return
0
;
return
0
;
}
}
...
...
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