Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5824b451 authored by Len Brown's avatar Len Brown
Browse files

Pull bugzilla-9262 into release branch

parents 7833b4ae 5870a8cd
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -881,12 +881,20 @@ int __init acpi_ec_ecdt_probe(void)
		boot_ec->gpe = ecdt_ptr->gpe;
		boot_ec->gpe = ecdt_ptr->gpe;
		boot_ec->handle = ACPI_ROOT_OBJECT;
		boot_ec->handle = ACPI_ROOT_OBJECT;
	} else {
	} else {
		/* This workaround is needed only on some broken machines,
		 * which require early EC, but fail to provide ECDT */
		acpi_handle x;
		printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
		printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
		status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
		status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
						boot_ec, NULL);
						boot_ec, NULL);
		/* Check that acpi_get_devices actually find something */
		/* Check that acpi_get_devices actually find something */
		if (ACPI_FAILURE(status) || !boot_ec->handle)
		if (ACPI_FAILURE(status) || !boot_ec->handle)
			goto error;
			goto error;
		/* We really need to limit this workaround, the only ASUS,
		 * which needs it, has fake EC._INI method, so use it as flag.
		 */
		if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x)))
			goto error;
	}
	}


	ret = ec_install_handlers(boot_ec);
	ret = ec_install_handlers(boot_ec);