|
Lines 807-812
Link Here
|
| 807 |
return AE_CTRL_TERMINATE; |
807 |
return AE_CTRL_TERMINATE; |
| 808 |
} |
808 |
} |
| 809 |
|
809 |
|
|
|
810 |
int __init acpi_boot_ec_enable(void) |
| 811 |
{ |
| 812 |
if (!boot_ec || boot_ec->handlers_installed) |
| 813 |
return 0; |
| 814 |
if (!ec_install_handlers(boot_ec)) { |
| 815 |
first_ec = boot_ec; |
| 816 |
return 0; |
| 817 |
} |
| 818 |
return -EFAULT; |
| 819 |
} |
| 820 |
|
| 810 |
int __init acpi_ec_ecdt_probe(void) |
821 |
int __init acpi_ec_ecdt_probe(void) |
| 811 |
{ |
822 |
{ |
| 812 |
int ret; |
823 |
int ret; |
|
Lines 832-842
Link Here
|
| 832 |
printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n"); |
843 |
printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n"); |
| 833 |
status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device, |
844 |
status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device, |
| 834 |
boot_ec, NULL); |
845 |
boot_ec, NULL); |
| 835 |
/* Check that acpi_get_devices actually find something */ |
846 |
/* Check that acpi_get_devices actually find something */ |
| 836 |
if (ACPI_FAILURE(status) || !boot_ec->handle) |
847 |
if (ACPI_FAILURE(status) || !boot_ec->handle) |
| 837 |
goto error; |
|
|
| 838 |
if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x))) |
| 839 |
goto error; |
848 |
goto error; |
|
|
849 |
/* We really need to limit this workaround, the only ASUS, |
| 850 |
* which needs it, has fake EC._INI method, so use it as flag. |
| 851 |
* Keep boot_ec struct as it will be needed soon. |
| 852 |
*/ |
| 853 |
if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x))) |
| 854 |
return -ENODEV; |
| 840 |
} |
855 |
} |
| 841 |
|
856 |
|
| 842 |
ret = ec_install_handlers(boot_ec); |
857 |
ret = ec_install_handlers(boot_ec); |