+ eeepc-laptopc-dont-enable-camera-at-startup-if-its-already-on.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     eeepc-laptop.c: don't enable camera at startup if it's already on.
has been added to the -mm tree.  Its filename is
     eeepc-laptopc-dont-enable-camera-at-startup-if-its-already-on.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: eeepc-laptop.c: don't enable camera at startup if it's already on.
From: Luca Niccoli <lultimouomo@xxxxxxxxx>

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@xxxxxxxxx>
Cc: Corentin Chary <corentincj@xxxxxxxxxx>
Cc: Len Brown <len.brown@xxxxxxxxx>
Cc: Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx>
Cc: Matthew Garrett <mjg@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


diff -puN drivers/platform/x86/eeepc-laptop.c~eeepc-laptopc-dont-enable-camera-at-startup-if-its-already-on drivers/platform/x86/eeepc-laptop.c
--- a/drivers/platform/x86/eeepc-laptop.c~eeepc-laptopc-dont-enable-camera-at-startup-if-its-already-on
+++ a/drivers/platform/x86/eeepc-laptop.c
@@ -356,7 +356,8 @@ static void __devinit eeepc_enable_camer
 	 * 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);
 }
 
 /*
_

Patches currently in -mm which might be from lultimouomo@xxxxxxxxx are

eeepc-laptopc-dont-enable-camera-at-startup-if-its-already-on.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux