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

(-)linux-2.6.33/drivers/acpi/ec.c.old (+16 lines)
Lines 781-786 Link Here
781
static int ec_install_handlers(struct acpi_ec *ec)
781
static int ec_install_handlers(struct acpi_ec *ec)
782
{
782
{
783
	acpi_status status;
783
	acpi_status status;
784
		
784
	if (test_bit(EC_FLAGS_HANDLERS_INSTALLED, &ec->flags))
785
	if (test_bit(EC_FLAGS_HANDLERS_INSTALLED, &ec->flags))
785
		return 0;
786
		return 0;
786
	status = acpi_install_gpe_handler(NULL, ec->gpe,
787
	status = acpi_install_gpe_handler(NULL, ec->gpe,
Lines 795-800 Link Here
795
						    &acpi_ec_space_handler,
796
						    &acpi_ec_space_handler,
796
						    NULL, ec);
797
						    NULL, ec);
797
	if (ACPI_FAILURE(status)) {
798
	if (ACPI_FAILURE(status)) {
799
		printk (KERN_INFO "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n");
798
		if (status == AE_NOT_FOUND) {
800
		if (status == AE_NOT_FOUND) {
799
			/*
801
			/*
800
			 * Maybe OS fails in evaluating the _REG object.
802
			 * Maybe OS fails in evaluating the _REG object.
Lines 808-813 Link Here
808
				&acpi_ec_gpe_handler);
810
				&acpi_ec_gpe_handler);
809
			return -ENODEV;
811
			return -ENODEV;
810
		}
812
		}
813
	}else{
814
		printk (KERN_INFO "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n");
811
	}
815
	}
812
816
813
	set_bit(EC_FLAGS_HANDLERS_INSTALLED, &ec->flags);
817
	set_bit(EC_FLAGS_HANDLERS_INSTALLED, &ec->flags);
Lines 829-834 Link Here
829
{
833
{
830
	struct acpi_ec *ec = NULL;
834
	struct acpi_ec *ec = NULL;
831
	int ret;
835
	int ret;
836
	acpi_status status;
837
	union acpi_object arg_objs[] = {
838
		{ACPI_TYPE_INTEGER},
839
		{ACPI_TYPE_INTEGER}
840
	};
841
	struct acpi_object_list args = { 2, arg_objs };
842
	arg_objs[0].integer.value = 3;
843
	arg_objs[1].integer.value = 1;
832
844
833
	strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME);
845
	strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME);
834
	strcpy(acpi_device_class(device), ACPI_EC_CLASS);
846
	strcpy(acpi_device_class(device), ACPI_EC_CLASS);
Lines 859-864 Link Here
859
	if (!first_ec)
871
	if (!first_ec)
860
		first_ec = ec;
872
		first_ec = ec;
861
	device->driver_data = ec;
873
	device->driver_data = ec;
874
	status = acpi_evaluate_object (ec->handle, "_REG", &args, NULL);
875
	if (ACPI_FAILURE(status)){
876
		printk (KERN_INFO "@@@@@@@@@@@@@ _REG\n");
877
	}
862
	acpi_ec_add_fs(device);
878
	acpi_ec_add_fs(device);
863
	pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
879
	pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
864
			  ec->gpe, ec->command_addr, ec->data_addr);
880
			  ec->gpe, ec->command_addr, ec->data_addr);

Return to bug 14216