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
ce63e186
Commit
ce63e186
authored
Aug 27, 2013
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pnp'
* pnp: PNP: convert PNP driver bus legacy pm_ops to dev_pm_ops
parents
8a3a53ea
eaf140b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
drivers/pnp/driver.c
drivers/pnp/driver.c
+18
-3
No files found.
drivers/pnp/driver.c
View file @
ce63e186
...
...
@@ -154,7 +154,7 @@ static int pnp_bus_match(struct device *dev, struct device_driver *drv)
return
1
;
}
static
int
pnp_bus_suspend
(
struct
device
*
dev
,
pm_message_t
state
)
static
int
__
pnp_bus_suspend
(
struct
device
*
dev
,
pm_message_t
state
)
{
struct
pnp_dev
*
pnp_dev
=
to_pnp_dev
(
dev
);
struct
pnp_driver
*
pnp_drv
=
pnp_dev
->
driver
;
...
...
@@ -180,6 +180,16 @@ static int pnp_bus_suspend(struct device *dev, pm_message_t state)
return
0
;
}
static
int
pnp_bus_suspend
(
struct
device
*
dev
)
{
return
__pnp_bus_suspend
(
dev
,
PMSG_SUSPEND
);
}
static
int
pnp_bus_freeze
(
struct
device
*
dev
)
{
return
__pnp_bus_suspend
(
dev
,
PMSG_FREEZE
);
}
static
int
pnp_bus_resume
(
struct
device
*
dev
)
{
struct
pnp_dev
*
pnp_dev
=
to_pnp_dev
(
dev
);
...
...
@@ -210,14 +220,19 @@ static int pnp_bus_resume(struct device *dev)
return
0
;
}
static
const
struct
dev_pm_ops
pnp_bus_dev_pm_ops
=
{
.
suspend
=
pnp_bus_suspend
,
.
freeze
=
pnp_bus_freeze
,
.
resume
=
pnp_bus_resume
,
};
struct
bus_type
pnp_bus_type
=
{
.
name
=
"pnp"
,
.
match
=
pnp_bus_match
,
.
probe
=
pnp_device_probe
,
.
remove
=
pnp_device_remove
,
.
shutdown
=
pnp_device_shutdown
,
.
suspend
=
pnp_bus_suspend
,
.
resume
=
pnp_bus_resume
,
.
pm
=
&
pnp_bus_dev_pm_ops
,
.
dev_attrs
=
pnp_interface_attrs
,
};
...
...
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