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
nexedi
linux
Commits
633aae23
Commit
633aae23
authored
Jul 22, 2009
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: serio - switch to using dev_pm_ops
Signed-off-by:
Dmitry Torokhov
<
dtor@mail.ru
>
parent
ebd7768d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
+11
-14
drivers/input/serio/serio.c
drivers/input/serio/serio.c
+11
-12
include/linux/serio.h
include/linux/serio.h
+0
-2
No files found.
drivers/input/serio/serio.c
View file @
633aae23
...
@@ -931,16 +931,12 @@ static int serio_uevent(struct device *dev, struct kobj_uevent_env *env)
...
@@ -931,16 +931,12 @@ static int serio_uevent(struct device *dev, struct kobj_uevent_env *env)
#endif
/* CONFIG_HOTPLUG */
#endif
/* CONFIG_HOTPLUG */
#ifdef CONFIG_PM
#ifdef CONFIG_PM
static
int
serio_suspend
(
struct
device
*
dev
,
pm_message_t
state
)
static
int
serio_suspend
(
struct
device
*
dev
)
{
{
struct
serio
*
serio
=
to_serio_port
(
dev
);
struct
serio
*
serio
=
to_serio_port
(
dev
);
if
(
!
serio
->
suspended
&&
state
.
event
==
PM_EVENT_SUSPEND
)
serio_cleanup
(
serio
);
serio_cleanup
(
serio
);
serio
->
suspended
=
state
.
event
==
PM_EVENT_SUSPEND
||
state
.
event
==
PM_EVENT_FREEZE
;
return
0
;
return
0
;
}
}
...
@@ -952,13 +948,17 @@ static int serio_resume(struct device *dev)
...
@@ -952,13 +948,17 @@ static int serio_resume(struct device *dev)
* Driver reconnect can take a while, so better let kseriod
* Driver reconnect can take a while, so better let kseriod
* deal with it.
* deal with it.
*/
*/
if
(
serio
->
suspended
)
{
serio
->
suspended
=
false
;
serio_queue_event
(
serio
,
NULL
,
SERIO_RECONNECT_PORT
);
serio_queue_event
(
serio
,
NULL
,
SERIO_RECONNECT_PORT
);
}
return
0
;
return
0
;
}
}
static
const
struct
dev_pm_ops
serio_pm_ops
=
{
.
suspend
=
serio_suspend
,
.
resume
=
serio_resume
,
.
poweroff
=
serio_suspend
,
.
restore
=
serio_resume
,
};
#endif
/* CONFIG_PM */
#endif
/* CONFIG_PM */
/* called from serio_driver->connect/disconnect methods under serio_mutex */
/* called from serio_driver->connect/disconnect methods under serio_mutex */
...
@@ -1015,8 +1015,7 @@ static struct bus_type serio_bus = {
...
@@ -1015,8 +1015,7 @@ static struct bus_type serio_bus = {
.
remove
=
serio_driver_remove
,
.
remove
=
serio_driver_remove
,
.
shutdown
=
serio_shutdown
,
.
shutdown
=
serio_shutdown
,
#ifdef CONFIG_PM
#ifdef CONFIG_PM
.
suspend
=
serio_suspend
,
.
pm
=
&
serio_pm_ops
,
.
resume
=
serio_resume
,
#endif
#endif
};
};
...
...
include/linux/serio.h
View file @
633aae23
...
@@ -31,8 +31,6 @@ struct serio {
...
@@ -31,8 +31,6 @@ struct serio {
bool
manual_bind
;
bool
manual_bind
;
bool
registered
;
/* port has been fully registered with driver core */
bool
registered
;
/* port has been fully registered with driver core */
bool
suspended
;
/* port is suspended */
struct
serio_device_id
id
;
struct
serio_device_id
id
;
...
...
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