projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2906206
)
ACPI button: don't try to use a non-existent lid device
author
Jesse Barnes
<jbarnes@virtuousgeek.org>
Wed, 7 Oct 2009 21:39:46 +0000
(14:39 -0700)
committer
Len Brown
<len.brown@intel.com>
Tue, 13 Oct 2009 06:53:30 +0000
(
02:53
-0400)
If a call comes in to check the lid state but there's no lid device
present, we should return -ENODEV.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/button.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/acpi/button.c
b/drivers/acpi/button.c
index 9335b87c51747a6f480017e5bf94d92c97b173cc..0c9c6a9a002cb397867269e7bc44f56d4bd9f9bd 100644
(file)
--- a/
drivers/acpi/button.c
+++ b/
drivers/acpi/button.c
@@
-251,6
+251,9
@@
int acpi_lid_open(void)
acpi_status status;
unsigned long long state;
+ if (!lid_device)
+ return -ENODEV;
+
status = acpi_evaluate_integer(lid_device->handle, "_LID", NULL,
&state);
if (ACPI_FAILURE(status))