diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2008-01-01 14:12:55 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-01-01 14:12:55 -0500 |
commit | c04209a7948b95e8c52084e8595e74e9428653d3 (patch) | |
tree | 8a7bed4071550e333f1a5e81558fc55a470cd554 /drivers/acpi/ec.c | |
parent | e697789d64f8748cb219d7f5c413c512953802cc (diff) |
ACPI: EC: Enable boot EC before bus_scan
Some _STA methods called during bus_scan() might require EC region handler,
which might be enabled later in the scan.
Enable it explicitly before scan to avoid errors.
Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9627
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index d411017f8c06..97dc16155a55 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -892,6 +892,17 @@ static int acpi_ec_stop(struct acpi_device *device, int type) | |||
892 | return 0; | 892 | return 0; |
893 | } | 893 | } |
894 | 894 | ||
895 | int __init acpi_boot_ec_enable(void) | ||
896 | { | ||
897 | if (!boot_ec || boot_ec->handlers_installed) | ||
898 | return 0; | ||
899 | if (!ec_install_handlers(boot_ec)) { | ||
900 | first_ec = boot_ec; | ||
901 | return 0; | ||
902 | } | ||
903 | return -EFAULT; | ||
904 | } | ||
905 | |||
895 | int __init acpi_ec_ecdt_probe(void) | 906 | int __init acpi_ec_ecdt_probe(void) |
896 | { | 907 | { |
897 | int ret; | 908 | int ret; |
@@ -924,9 +935,10 @@ int __init acpi_ec_ecdt_probe(void) | |||
924 | goto error; | 935 | goto error; |
925 | /* We really need to limit this workaround, the only ASUS, | 936 | /* We really need to limit this workaround, the only ASUS, |
926 | * which needs it, has fake EC._INI method, so use it as flag. | 937 | * which needs it, has fake EC._INI method, so use it as flag. |
938 | * Keep boot_ec struct as it will be needed soon. | ||
927 | */ | 939 | */ |
928 | if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x))) | 940 | if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x))) |
929 | goto error; | 941 | return -ENODEV; |
930 | } | 942 | } |
931 | 943 | ||
932 | ret = ec_install_handlers(boot_ec); | 944 | ret = ec_install_handlers(boot_ec); |