aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/asus_acpi.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index eb0b8fb837c6..38b69cb69773 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -2,7 +2,7 @@
2 * asus_acpi.c - Asus Laptop ACPI Extras 2 * asus_acpi.c - Asus Laptop ACPI Extras
3 * 3 *
4 * 4 *
5 * Copyright (C) 2002, 2003, 2004 Julien Lerouge, Karol Kozimor 5 * Copyright (C) 2002-2005 Julien Lerouge, 2003-2006 Karol Kozimor
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -27,10 +27,6 @@
27 * Johann Wiesner - Small compile fixes 27 * Johann Wiesner - Small compile fixes
28 * John Belmonte - ACPI code for Toshiba laptop was a good starting point. 28 * John Belmonte - ACPI code for Toshiba laptop was a good starting point.
29 * 29 *
30 * TODO:
31 * add Fn key status
32 * Add mode selection on module loading (parameter) -> still necessary?
33 * Complete display switching -- may require dirty hacks or calling _DOS?
34 */ 30 */
35 31
36#include <linux/kernel.h> 32#include <linux/kernel.h>
@@ -42,7 +38,7 @@
42#include <acpi/acpi_bus.h> 38#include <acpi/acpi_bus.h>
43#include <asm/uaccess.h> 39#include <asm/uaccess.h>
44 40
45#define ASUS_ACPI_VERSION "0.29" 41#define ASUS_ACPI_VERSION "0.30"
46 42
47#define PROC_ASUS "asus" //the directory 43#define PROC_ASUS "asus" //the directory
48#define PROC_MLED "mled" 44#define PROC_MLED "mled"
@@ -149,17 +145,8 @@ struct asus_hotk {
149 145
150static struct model_data model_conf[END_MODEL] = { 146static struct model_data model_conf[END_MODEL] = {
151 /* 147 /*
152 * Those pathnames are relative to the HOTK / ATKD device :
153 * - mt_mled
154 * - mt_wled
155 * - brightness_set
156 * - brightness_get
157 * - display_set
158 * - display_get
159 *
160 * TODO I have seen a SWBX and AIBX method on some models, like L1400B, 148 * TODO I have seen a SWBX and AIBX method on some models, like L1400B,
161 * it seems to be a kind of switch, but what for ? 149 * it seems to be a kind of switch, but what for ?
162 *
163 */ 150 */
164 151
165 { 152 {
@@ -993,7 +980,7 @@ static int asus_hotk_get_info(void)
993 if (buffer.pointer == NULL) 980 if (buffer.pointer == NULL)
994 return -EINVAL; 981 return -EINVAL;
995 982
996 model = (union acpi_object *) buffer.pointer; 983 model = (union acpi_object *)buffer.pointer;
997 /* 984 /*
998 * Samsung P30 has a device with a valid _HID whose INIT does not 985 * Samsung P30 has a device with a valid _HID whose INIT does not
999 * return anything. It used to be possible to catch this exception, 986 * return anything. It used to be possible to catch this exception,
@@ -1002,7 +989,8 @@ static int asus_hotk_get_info(void)
1002 * identifier but it's still possible to get completely bogus data. 989 * identifier but it's still possible to get completely bogus data.
1003 */ 990 */
1004 if (model->type == ACPI_TYPE_STRING) { 991 if (model->type == ACPI_TYPE_STRING) {
1005 printk(KERN_NOTICE " %s model detected, ", model->string.pointer); 992 printk(KERN_NOTICE " %s model detected, ",
993 model->string.pointer);
1006 } else { 994 } else {
1007 if (asus_info && /* Samsung P30 */ 995 if (asus_info && /* Samsung P30 */
1008 strncmp(asus_info->oem_table_id, "ODEM", 4) == 0) { 996 strncmp(asus_info->oem_table_id, "ODEM", 4) == 0) {
@@ -1016,7 +1004,7 @@ static int asus_hotk_get_info(void)
1016 "the developers with your DSDT\n"); 1004 "the developers with your DSDT\n");
1017 } 1005 }
1018 hotk->methods = &model_conf[hotk->model]; 1006 hotk->methods = &model_conf[hotk->model];
1019 1007
1020 kfree(model); 1008 kfree(model);
1021 1009
1022 return AE_OK; 1010 return AE_OK;
@@ -1164,8 +1152,7 @@ static int asus_hotk_add(struct acpi_device *device)
1164 /* For laptops without GPLV: init the hotk->brightness value */ 1152 /* For laptops without GPLV: init the hotk->brightness value */
1165 if ((!hotk->methods->brightness_get) 1153 if ((!hotk->methods->brightness_get)
1166 && (!hotk->methods->brightness_status) 1154 && (!hotk->methods->brightness_status)
1167 && (hotk->methods->brightness_up 1155 && (hotk->methods->brightness_up && hotk->methods->brightness_down)) {
1168 && hotk->methods->brightness_down)) {
1169 status = 1156 status =
1170 acpi_evaluate_object(NULL, hotk->methods->brightness_down, 1157 acpi_evaluate_object(NULL, hotk->methods->brightness_down,
1171 NULL, NULL); 1158 NULL, NULL);