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
ba9d35fb
Commit
ba9d35fb
authored
Apr 18, 2005
by
Pavel Machek
Committed by
Greg K-H
Apr 18, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: fix up remaining pm_message_t usages
Signed-off-by:
Greg Kroah-Hartman
<
gregkh@suse.de
>
parent
9a5d3e98
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
drivers/usb/core/hub.c
drivers/usb/core/hub.c
+2
-2
drivers/usb/gadget/omap_udc.c
drivers/usb/gadget/omap_udc.c
+5
-7
drivers/usb/host/ohci-omap.c
drivers/usb/host/ohci-omap.c
+3
-1
drivers/usb/host/ohci-pxa27x.c
drivers/usb/host/ohci-pxa27x.c
+2
-2
No files found.
drivers/usb/core/hub.c
View file @
ba9d35fb
...
...
@@ -1456,7 +1456,7 @@ static void hub_port_logical_disconnect(struct usb_hub *hub, int port1)
/* FIXME let caller ask to power down the port:
* - some devices won't enumerate without a VBUS power cycle
* - SRP saves power that way
* - usb_suspend_device(dev,
PM_SUSPEND_DISK
)
* - usb_suspend_device(dev,
PMSG_SUSPEND
)
* That's easy if this hub can switch power per-port, and
* khubd reactivates the port later (timer, SRP, etc).
* Powerdown must be optional, because of reset/DFU.
...
...
@@ -1531,7 +1531,7 @@ static int hub_port_suspend(struct usb_hub *hub, int port1,
/*
* Devices on USB hub ports have only one "suspend" state, corresponding
* to ACPI D2
(PM_SUSPEND_MEM)
, "may cause the device to lose some context".
* to ACPI D2, "may cause the device to lose some context".
* State transitions include:
*
* - suspend, resume ... when the VBUS power link stays live
...
...
drivers/usb/gadget/omap_udc.c
View file @
ba9d35fb
...
...
@@ -2809,17 +2809,15 @@ static int __exit omap_udc_remove(struct device *dev)
return
0
;
}
/* suspend/resume/wakeup from sysfs (echo > power/state) */
static
int
omap_udc_suspend
(
struct
device
*
dev
,
u32
state
,
u32
level
)
static
int
omap_udc_suspend
(
struct
device
*
dev
,
pm_message_t
state
,
u32
level
)
{
if
(
level
!=
0
)
return
0
;
DBG
(
"suspend, state %d
\n
"
,
state
);
omap_pullup
(
&
udc
->
gadget
,
0
);
udc
->
gadget
.
dev
.
power
.
power_state
=
3
;
udc
->
gadget
.
dev
.
parent
->
power
.
power_state
=
3
;
udc
->
gadget
.
dev
.
power
.
power_state
=
PMSG_SUSPEND
;
udc
->
gadget
.
dev
.
parent
->
power
.
power_state
=
PMSG_SUSPEND
;
return
0
;
}
...
...
@@ -2829,8 +2827,8 @@ static int omap_udc_resume(struct device *dev, u32 level)
return
0
;
DBG
(
"resume + wakeup/SRP
\n
"
);
udc
->
gadget
.
dev
.
parent
->
power
.
power_state
=
0
;
udc
->
gadget
.
dev
.
power
.
power_state
=
0
;
udc
->
gadget
.
dev
.
parent
->
power
.
power_state
=
PMSG_ON
;
udc
->
gadget
.
dev
.
power
.
power_state
=
PMSG_ON
;
omap_pullup
(
&
udc
->
gadget
,
1
);
/* maybe the host would enumerate us if we nudged it */
...
...
drivers/usb/host/ohci-omap.c
View file @
ba9d35fb
...
...
@@ -458,9 +458,11 @@ static int ohci_hcd_omap_drv_remove(struct device *dev)
/* states match PCI usage, always suspending the root hub except that
* 4 ~= D3cold (ACPI D3) with clock off (resume sees reset).
*
* FIXME: above comment is not right, and code is wrong, too :-(.
*/
static
int
ohci_omap_suspend
(
struct
device
*
dev
,
u32
state
,
u32
level
)
static
int
ohci_omap_suspend
(
struct
device
*
dev
,
pm_message_t
state
,
u32
level
)
{
struct
ohci_hcd
*
ohci
=
hcd_to_ohci
(
dev_get_drvdata
(
dev
));
int
status
=
-
EINVAL
;
...
...
drivers/usb/host/ohci-pxa27x.c
View file @
ba9d35fb
...
...
@@ -337,7 +337,7 @@ static int ohci_hcd_pxa27x_drv_remove(struct device *dev)
return
0
;
}
static
int
ohci_hcd_pxa27x_drv_suspend
(
struct
device
*
dev
,
u32
state
,
u32
level
)
static
int
ohci_hcd_pxa27x_drv_suspend
(
struct
device
*
dev
,
pm_message_t
state
,
u32
level
)
{
// struct platform_device *pdev = to_platform_device(dev);
// struct usb_hcd *hcd = dev_get_drvdata(dev);
...
...
@@ -346,7 +346,7 @@ static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, u32 state, u32 level)
return
0
;
}
static
int
ohci_hcd_pxa27x_drv_resume
(
struct
device
*
dev
,
u32
state
)
static
int
ohci_hcd_pxa27x_drv_resume
(
struct
device
*
dev
,
u32
level
)
{
// struct platform_device *pdev = to_platform_device(dev);
// struct usb_hcd *hcd = dev_get_drvdata(dev);
...
...
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