diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-06-16 15:28:45 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-06-24 01:30:34 -0400 |
commit | cede2cb6ee9b0ddaa3dbc9939418ff177a831600 (patch) | |
tree | 53bfc83cb52fe71164278874cf8670f41a8e2b4b /drivers/platform | |
parent | 57599cc997b81a7c4f764693a7316886a72067fe (diff) |
eeepc-laptop: enable camera by default
If we leave the camera disabled by default, userspace programs (e.g.
Skype, Cheese) leave the user out in the cold saying that the machine
"has no camera." Therefore, it's better to enable camera by default and
let people who really don't want it just disable the thing.
To reduce power usage you should enable USB autosuspend:
echo -n auto > /sys/bus/usb/drivers/uvcvideo/*:*/../power/level
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 46b5aa5e85f0..884d76b9e8ba 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -321,6 +321,15 @@ static const struct rfkill_ops eeepc_rfkill_ops = { | |||
321 | .set_block = eeepc_rfkill_set, | 321 | .set_block = eeepc_rfkill_set, |
322 | }; | 322 | }; |
323 | 323 | ||
324 | static void __init eeepc_enable_camera(void) | ||
325 | { | ||
326 | /* | ||
327 | * If the following call to set_acpi() fails, it's because there's no | ||
328 | * camera so we can ignore the error. | ||
329 | */ | ||
330 | set_acpi(CM_ASL_CAMERA, 1); | ||
331 | } | ||
332 | |||
324 | /* | 333 | /* |
325 | * Sys helpers | 334 | * Sys helpers |
326 | */ | 335 | */ |
@@ -983,6 +992,9 @@ static int __init eeepc_laptop_init(void) | |||
983 | result = eeepc_hwmon_init(dev); | 992 | result = eeepc_hwmon_init(dev); |
984 | if (result) | 993 | if (result) |
985 | goto fail_hwmon; | 994 | goto fail_hwmon; |
995 | |||
996 | eeepc_enable_camera(); | ||
997 | |||
986 | /* Register platform stuff */ | 998 | /* Register platform stuff */ |
987 | result = platform_driver_register(&platform_driver); | 999 | result = platform_driver_register(&platform_driver); |
988 | if (result) | 1000 | if (result) |