* [PATCH] ACPI button: don't try to use a non-existent lid device
@ 2009-10-07 21:39 Jesse Barnes
2009-10-13 6:53 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jesse Barnes @ 2009-10-07 21:39 UTC (permalink / raw)
To: Len Brown, intel-gfx, linux-acpi
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>
---
drivers/acpi/button.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 9335b87..0c9c6a9 100644
--- 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))
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI button: don't try to use a non-existent lid device
2009-10-07 21:39 [PATCH] ACPI button: don't try to use a non-existent lid device Jesse Barnes
@ 2009-10-13 6:53 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2009-10-13 6:53 UTC (permalink / raw)
To: Jesse Barnes; +Cc: intel-gfx, linux-acpi
applied
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-13 6:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07 21:39 [PATCH] ACPI button: don't try to use a non-existent lid device Jesse Barnes
2009-10-13 6:53 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox