View | Details | Raw Unified | Return to bug 44161 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/acpi/ec.c (+20 lines)
Lines 1042-1047 error: Link Here
1042
	return -ENODEV;
1042
	return -ENODEV;
1043
}
1043
}
1044
1044
1045
static int acpi_ec_resume(struct device *dev)
1046
{
1047
	struct acpi_ec *ec = acpi_driver_data(to_acpi_device(dev));
1048
	int status, i;
1049
	u8 value = 0;
1050
1051
	mutex_lock(&ec->mutex);
1052
	for (i = 0; i < 20; i++) {
1053
		status = acpi_ec_query_unlocked(ec, &value);
1054
		if (status || !value)
1055
			break;
1056
	}
1057
	mutex_unlock(&ec->mutex);
1058
1059
       return 0;
1060
}
1061
1062
static SIMPLE_DEV_PM_OPS(acpi_ec_pm, NULL, acpi_ec_resume);
1063
1045
static struct acpi_driver acpi_ec_driver = {
1064
static struct acpi_driver acpi_ec_driver = {
1046
	.name = "ec",
1065
	.name = "ec",
1047
	.class = ACPI_EC_CLASS,
1066
	.class = ACPI_EC_CLASS,
Lines 1050-1055 static struct acpi_driver acpi_ec_driver = { Link Here
1050
		.add = acpi_ec_add,
1069
		.add = acpi_ec_add,
1051
		.remove = acpi_ec_remove,
1070
		.remove = acpi_ec_remove,
1052
		},
1071
		},
1072
	.drv.pm = &acpi_ec_pm,
1053
};
1073
};
1054
1074
1055
int __init acpi_ec_init(void)
1075
int __init acpi_ec_init(void)

Return to bug 44161