View | Details | Raw Unified | Return to bug 334005
Collapse All | Expand All

(-)linux-2.6.22.orig/drivers/acpi/ec.c (-4 / +19 lines)
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);
(-)linux-2.6.22.orig/drivers/acpi/scan.c (+6 lines)
Lines 1380-1385 Link Here
1380
	return result;
1380
	return result;
1381
}
1381
}
1382
1382
1383
int __init acpi_boot_ec_enable(void);
1384
1383
static int __init acpi_scan_init(void)
1385
static int __init acpi_scan_init(void)
1384
{
1386
{
1385
	int result;
1387
	int result;
Lines 1411-1416 Link Here
1411
	 * Enumerate devices in the ACPI namespace.
1413
	 * Enumerate devices in the ACPI namespace.
1412
	 */
1414
	 */
1413
	result = acpi_bus_scan_fixed(acpi_root);
1415
	result = acpi_bus_scan_fixed(acpi_root);
1416
1417
	/* EC region might be needed at bus_scan, so enable it now */
1418
	acpi_boot_ec_enable();
1419
1414
	if (!result)
1420
	if (!result)
1415
		result = acpi_bus_scan(acpi_root, &ops);
1421
		result = acpi_bus_scan(acpi_root, &ops);
1416
1422

Return to bug 334005