diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-03-28 17:04:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-04-01 22:33:06 -0500 |
commit | ff2fc3e9e3edb918b6c6b288485c6cb267bc865e (patch) | |
tree | b59bfffe58d9e34be055030078b8da9451b8d5a7 /drivers/acpi/ec.c | |
parent | 683aa4012f53b2ada0f430487e05d37b0d94e90a (diff) |
ACPI: EC acpi-ecdt-uid-hack
On some boxes ecdt uid may be equal to 0, so do not test for uids equality,
so that fake handler will be unconditionally removed to allow loading the
real one.
See http://bugzilla.kernel.org/show_bug.cgi?id=6111
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Luming Yu <luming.yu@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index eee0864ba300..e638168775b9 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -991,7 +991,6 @@ static int acpi_ec_poll_add(struct acpi_device *device) | |||
991 | int result = 0; | 991 | int result = 0; |
992 | acpi_status status = AE_OK; | 992 | acpi_status status = AE_OK; |
993 | union acpi_ec *ec = NULL; | 993 | union acpi_ec *ec = NULL; |
994 | unsigned long uid; | ||
995 | 994 | ||
996 | ACPI_FUNCTION_TRACE("acpi_ec_add"); | 995 | ACPI_FUNCTION_TRACE("acpi_ec_add"); |
997 | 996 | ||
@@ -1014,10 +1013,9 @@ static int acpi_ec_poll_add(struct acpi_device *device) | |||
1014 | acpi_evaluate_integer(ec->common.handle, "_GLK", NULL, | 1013 | acpi_evaluate_integer(ec->common.handle, "_GLK", NULL, |
1015 | &ec->common.global_lock); | 1014 | &ec->common.global_lock); |
1016 | 1015 | ||
1017 | /* If our UID matches the UID for the ECDT-enumerated EC, | 1016 | /* XXX we don't test uids, because on some boxes ecdt uid = 0, see: |
1018 | we now have the *real* EC info, so kill the makeshift one. */ | 1017 | http://bugzilla.kernel.org/show_bug.cgi?id=6111 */ |
1019 | acpi_evaluate_integer(ec->common.handle, "_UID", NULL, &uid); | 1018 | if (ec_ecdt) { |
1020 | if (ec_ecdt && ec_ecdt->common.uid == uid) { | ||
1021 | acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, | 1019 | acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, |
1022 | ACPI_ADR_SPACE_EC, | 1020 | ACPI_ADR_SPACE_EC, |
1023 | &acpi_ec_space_handler); | 1021 | &acpi_ec_space_handler); |
@@ -1062,7 +1060,6 @@ static int acpi_ec_intr_add(struct acpi_device *device) | |||
1062 | int result = 0; | 1060 | int result = 0; |
1063 | acpi_status status = AE_OK; | 1061 | acpi_status status = AE_OK; |
1064 | union acpi_ec *ec = NULL; | 1062 | union acpi_ec *ec = NULL; |
1065 | unsigned long uid; | ||
1066 | 1063 | ||
1067 | ACPI_FUNCTION_TRACE("acpi_ec_add"); | 1064 | ACPI_FUNCTION_TRACE("acpi_ec_add"); |
1068 | 1065 | ||
@@ -1088,10 +1085,9 @@ static int acpi_ec_intr_add(struct acpi_device *device) | |||
1088 | acpi_evaluate_integer(ec->common.handle, "_GLK", NULL, | 1085 | acpi_evaluate_integer(ec->common.handle, "_GLK", NULL, |
1089 | &ec->common.global_lock); | 1086 | &ec->common.global_lock); |
1090 | 1087 | ||
1091 | /* If our UID matches the UID for the ECDT-enumerated EC, | 1088 | /* XXX we don't test uids, because on some boxes ecdt uid = 0, see: |
1092 | we now have the *real* EC info, so kill the makeshift one. */ | 1089 | http://bugzilla.kernel.org/show_bug.cgi?id=6111 */ |
1093 | acpi_evaluate_integer(ec->common.handle, "_UID", NULL, &uid); | 1090 | if (ec_ecdt) { |
1094 | if (ec_ecdt && ec_ecdt->common.uid == uid) { | ||
1095 | acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, | 1091 | acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, |
1096 | ACPI_ADR_SPACE_EC, | 1092 | ACPI_ADR_SPACE_EC, |
1097 | &acpi_ec_space_handler); | 1093 | &acpi_ec_space_handler); |