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
2cebc5e2
Commit
2cebc5e2
authored
Jun 17, 2010
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugzilla-15951' into release
parents
c1db9d9b
cb1cb178
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
+9
-15
drivers/acpi/button.c
drivers/acpi/button.c
+2
-2
drivers/acpi/wakeup.c
drivers/acpi/wakeup.c
+7
-13
No files found.
drivers/acpi/button.c
View file @
2cebc5e2
...
@@ -425,7 +425,7 @@ static int acpi_button_add(struct acpi_device *device)
...
@@ -425,7 +425,7 @@ static int acpi_button_add(struct acpi_device *device)
/* Button's GPE is run-wake GPE */
/* Button's GPE is run-wake GPE */
acpi_enable_gpe
(
device
->
wakeup
.
gpe_device
,
acpi_enable_gpe
(
device
->
wakeup
.
gpe_device
,
device
->
wakeup
.
gpe_number
,
device
->
wakeup
.
gpe_number
,
ACPI_GPE_TYPE_
WAKE_RUN
);
ACPI_GPE_TYPE_
RUNTIME
);
device
->
wakeup
.
run_wake_count
++
;
device
->
wakeup
.
run_wake_count
++
;
device
->
wakeup
.
state
.
enabled
=
1
;
device
->
wakeup
.
state
.
enabled
=
1
;
}
}
...
@@ -449,7 +449,7 @@ static int acpi_button_remove(struct acpi_device *device, int type)
...
@@ -449,7 +449,7 @@ static int acpi_button_remove(struct acpi_device *device, int type)
if
(
device
->
wakeup
.
flags
.
valid
)
{
if
(
device
->
wakeup
.
flags
.
valid
)
{
acpi_disable_gpe
(
device
->
wakeup
.
gpe_device
,
acpi_disable_gpe
(
device
->
wakeup
.
gpe_device
,
device
->
wakeup
.
gpe_number
,
device
->
wakeup
.
gpe_number
,
ACPI_GPE_TYPE_
WAKE_RUN
);
ACPI_GPE_TYPE_
RUNTIME
);
device
->
wakeup
.
run_wake_count
--
;
device
->
wakeup
.
run_wake_count
--
;
device
->
wakeup
.
state
.
enabled
=
0
;
device
->
wakeup
.
state
.
enabled
=
0
;
}
}
...
...
drivers/acpi/wakeup.c
View file @
2cebc5e2
...
@@ -64,16 +64,13 @@ void acpi_enable_wakeup_device(u8 sleep_state)
...
@@ -64,16 +64,13 @@ void acpi_enable_wakeup_device(u8 sleep_state)
struct
acpi_device
*
dev
=
struct
acpi_device
*
dev
=
container_of
(
node
,
struct
acpi_device
,
wakeup_list
);
container_of
(
node
,
struct
acpi_device
,
wakeup_list
);
if
(
!
dev
->
wakeup
.
flags
.
valid
)
if
(
!
dev
->
wakeup
.
flags
.
valid
||
!
dev
->
wakeup
.
state
.
enabled
continue
;
if
((
!
dev
->
wakeup
.
state
.
enabled
&&
!
dev
->
wakeup
.
prepare_count
)
||
sleep_state
>
(
u32
)
dev
->
wakeup
.
sleep_state
)
||
sleep_state
>
(
u32
)
dev
->
wakeup
.
sleep_state
)
continue
;
continue
;
/* The wake-up power should have been enabled already. */
/* The wake-up power should have been enabled already. */
acpi_
set
_gpe
(
dev
->
wakeup
.
gpe_device
,
dev
->
wakeup
.
gpe_number
,
acpi_
enable
_gpe
(
dev
->
wakeup
.
gpe_device
,
dev
->
wakeup
.
gpe_number
,
ACPI_GPE_
ENABL
E
);
ACPI_GPE_
TYPE_WAK
E
);
}
}
}
}
...
@@ -96,6 +93,8 @@ void acpi_disable_wakeup_device(u8 sleep_state)
...
@@ -96,6 +93,8 @@ void acpi_disable_wakeup_device(u8 sleep_state)
||
(
sleep_state
>
(
u32
)
dev
->
wakeup
.
sleep_state
))
||
(
sleep_state
>
(
u32
)
dev
->
wakeup
.
sleep_state
))
continue
;
continue
;
acpi_disable_gpe
(
dev
->
wakeup
.
gpe_device
,
dev
->
wakeup
.
gpe_number
,
ACPI_GPE_TYPE_WAKE
);
acpi_disable_wakeup_device_power
(
dev
);
acpi_disable_wakeup_device_power
(
dev
);
}
}
}
}
...
@@ -109,13 +108,8 @@ int __init acpi_wakeup_device_init(void)
...
@@ -109,13 +108,8 @@ int __init acpi_wakeup_device_init(void)
struct
acpi_device
*
dev
=
container_of
(
node
,
struct
acpi_device
*
dev
=
container_of
(
node
,
struct
acpi_device
,
struct
acpi_device
,
wakeup_list
);
wakeup_list
);
/* In case user doesn't load button driver */
if
(
dev
->
wakeup
.
flags
.
always_enabled
)
if
(
!
dev
->
wakeup
.
flags
.
always_enabled
||
dev
->
wakeup
.
state
.
enabled
=
1
;
dev
->
wakeup
.
state
.
enabled
)
continue
;
acpi_enable_gpe
(
dev
->
wakeup
.
gpe_device
,
dev
->
wakeup
.
gpe_number
,
ACPI_GPE_TYPE_WAKE
);
dev
->
wakeup
.
state
.
enabled
=
1
;
}
}
mutex_unlock
(
&
acpi_device_lock
);
mutex_unlock
(
&
acpi_device_lock
);
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