From: Luca Niccoli Date: Fri, 16 Oct 2009 20:22:47 +0000 (+0200) Subject: eeepc-laptop: don't enable camera at startup if it's already on. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=80f0c895b57f0d936b420de6afea5167a49f62fa;p=openwrt%2Fstaging%2Fblogic.git eeepc-laptop: 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 Cc: Corentin Chary Cc: Alan Jenkins Cc: Matthew Garrett Signed-off-by: Andrew Morton Signed-off-by: Corentin Chary Signed-off-by: Len Brown --- diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 789d6ae003fb..4226e5352738 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -356,7 +356,8 @@ static void __devinit 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); } /*