[<prev] [next>] [day] [month] [year] [list]
Date: Sat, 10 Oct 2009 19:03:58 +0200
From: Luca Niccoli <lultimouomo@...il.com>
To: linux-kernel@...r.kernel.org, acpi4asus-user@...ts.sourceforge.net
Cc: corentincj@...aif.net
Subject: [PATCH] eeepc-laptop.c: Don't enable camera at startup if it's
already on.
Switching the camera takes 500ms, checking if it's on is almost free...
The BIOS remembers the setting through reboots, so there's good chance the
camera is already enabled.
Signed-off-by: Luca Niccoli <lultimouomo@...il.com>
---
drivers/platform/x86/eeepc-laptop.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 749e210..2754304 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -356,7 +356,8 @@ static void __init eeepc_enable_camera(void)
* If the following call to set_acpi() fails, it's because there's no
* camera so we can ignore the error.
*/
- set_acpi(CM_ASL_CAMERA, 1);
+ if (get_acpi(CM_ASL_CAMERA) == 0)
+ set_acpi(CM_ASL_CAMERA, 1);
}
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists