Skip to content

Commit

Permalink
eeepc-laptop: don't enable camera at startup if it's already on.
Browse files Browse the repository at this point in the history
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@gmail.com>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Luca Niccoli authored and Len Brown committed Nov 3, 2009
1 parent 58ce48a commit 80f0c89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/platform/x86/eeepc-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit 80f0c89

Please sign in to comment.