diff options
| -rw-r--r-- | drivers/acpi/ec.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 034a96372357..722acafdf32e 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
| @@ -99,7 +99,7 @@ static struct acpi_driver acpi_ec_driver = { | |||
| 99 | struct acpi_ec { | 99 | struct acpi_ec { |
| 100 | acpi_handle handle; | 100 | acpi_handle handle; |
| 101 | unsigned long uid; | 101 | unsigned long uid; |
| 102 | unsigned long gpe_bit; | 102 | unsigned long gpe; |
| 103 | unsigned long command_addr; | 103 | unsigned long command_addr; |
| 104 | unsigned long data_addr; | 104 | unsigned long data_addr; |
| 105 | unsigned long global_lock; | 105 | unsigned long global_lock; |
| @@ -297,7 +297,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command, | |||
| 297 | mutex_lock(&ec->lock); | 297 | mutex_lock(&ec->lock); |
| 298 | 298 | ||
| 299 | /* Make sure GPE is enabled before doing transaction */ | 299 | /* Make sure GPE is enabled before doing transaction */ |
| 300 | acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR); | 300 | acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); |
| 301 | 301 | ||
| 302 | status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0); | 302 | status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0); |
| 303 | if (status) { | 303 | if (status) { |
| @@ -563,14 +563,14 @@ static int acpi_ec_read_info(struct seq_file *seq, void *offset) | |||
| 563 | if (!ec) | 563 | if (!ec) |
| 564 | goto end; | 564 | goto end; |
| 565 | 565 | ||
| 566 | seq_printf(seq, "gpe bit: 0x%02x\n", | 566 | seq_printf(seq, "gpe: 0x%02x\n", |
| 567 | (u32) ec->gpe_bit); | 567 | (u32) ec->gpe); |
| 568 | seq_printf(seq, "ports: 0x%02x, 0x%02x\n", | 568 | seq_printf(seq, "ports: 0x%02x, 0x%02x\n", |
| 569 | (u32) ec->command_addr, | 569 | (u32) ec->command_addr, |
| 570 | (u32) ec->data_addr); | 570 | (u32) ec->data_addr); |
| 571 | seq_printf(seq, "use global lock: %s\n", | 571 | seq_printf(seq, "use global lock: %s\n", |
| 572 | ec->global_lock ? "yes" : "no"); | 572 | ec->global_lock ? "yes" : "no"); |
| 573 | acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR); | 573 | acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); |
| 574 | 574 | ||
| 575 | end: | 575 | end: |
| 576 | return 0; | 576 | return 0; |
| @@ -668,7 +668,7 @@ static int acpi_ec_add(struct acpi_device *device) | |||
| 668 | ACPI_ADR_SPACE_EC, | 668 | ACPI_ADR_SPACE_EC, |
| 669 | &acpi_ec_space_handler); | 669 | &acpi_ec_space_handler); |
| 670 | 670 | ||
| 671 | acpi_remove_gpe_handler(NULL, ec_ecdt->gpe_bit, | 671 | acpi_remove_gpe_handler(NULL, ec_ecdt->gpe, |
| 672 | &acpi_ec_gpe_handler); | 672 | &acpi_ec_gpe_handler); |
| 673 | 673 | ||
| 674 | kfree(ec_ecdt); | 674 | kfree(ec_ecdt); |
| @@ -678,7 +678,7 @@ static int acpi_ec_add(struct acpi_device *device) | |||
| 678 | /* TODO: Add support for _GPE returning a package */ | 678 | /* TODO: Add support for _GPE returning a package */ |
| 679 | status = | 679 | status = |
| 680 | acpi_evaluate_integer(ec->handle, "_GPE", NULL, | 680 | acpi_evaluate_integer(ec->handle, "_GPE", NULL, |
| 681 | &ec->gpe_bit); | 681 | &ec->gpe); |
| 682 | if (ACPI_FAILURE(status)) { | 682 | if (ACPI_FAILURE(status)) { |
| 683 | ACPI_EXCEPTION((AE_INFO, status, "Obtaining GPE bit assignment")); | 683 | ACPI_EXCEPTION((AE_INFO, status, "Obtaining GPE bit assignment")); |
| 684 | result = -ENODEV; | 684 | result = -ENODEV; |
| @@ -691,7 +691,7 @@ static int acpi_ec_add(struct acpi_device *device) | |||
| 691 | 691 | ||
| 692 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s [%s] (gpe %d) interrupt mode.", | 692 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s [%s] (gpe %d) interrupt mode.", |
| 693 | acpi_device_name(device), acpi_device_bid(device), | 693 | acpi_device_name(device), acpi_device_bid(device), |
| 694 | (u32) ec->gpe_bit)); | 694 | (u32) ec->gpe)); |
| 695 | 695 | ||
| 696 | if (!first_ec) | 696 | if (!first_ec) |
| 697 | first_ec = device; | 697 | first_ec = device; |
| @@ -771,26 +771,26 @@ static int acpi_ec_start(struct acpi_device *device) | |||
| 771 | } | 771 | } |
| 772 | 772 | ||
| 773 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "gpe=0x%02lx, ports=0x%2lx,0x%2lx", | 773 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "gpe=0x%02lx, ports=0x%2lx,0x%2lx", |
| 774 | ec->gpe_bit, ec->command_addr, ec->data_addr)); | 774 | ec->gpe, ec->command_addr, ec->data_addr)); |
| 775 | 775 | ||
| 776 | /* | 776 | /* |
| 777 | * Install GPE handler | 777 | * Install GPE handler |
| 778 | */ | 778 | */ |
| 779 | status = acpi_install_gpe_handler(NULL, ec->gpe_bit, | 779 | status = acpi_install_gpe_handler(NULL, ec->gpe, |
| 780 | ACPI_GPE_EDGE_TRIGGERED, | 780 | ACPI_GPE_EDGE_TRIGGERED, |
| 781 | &acpi_ec_gpe_handler, ec); | 781 | &acpi_ec_gpe_handler, ec); |
| 782 | if (ACPI_FAILURE(status)) { | 782 | if (ACPI_FAILURE(status)) { |
| 783 | return -ENODEV; | 783 | return -ENODEV; |
| 784 | } | 784 | } |
| 785 | acpi_set_gpe_type(NULL, ec->gpe_bit, ACPI_GPE_TYPE_RUNTIME); | 785 | acpi_set_gpe_type(NULL, ec->gpe, ACPI_GPE_TYPE_RUNTIME); |
| 786 | acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR); | 786 | acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); |
| 787 | 787 | ||
| 788 | status = acpi_install_address_space_handler(ec->handle, | 788 | status = acpi_install_address_space_handler(ec->handle, |
| 789 | ACPI_ADR_SPACE_EC, | 789 | ACPI_ADR_SPACE_EC, |
| 790 | &acpi_ec_space_handler, | 790 | &acpi_ec_space_handler, |
| 791 | &acpi_ec_space_setup, ec); | 791 | &acpi_ec_space_setup, ec); |
| 792 | if (ACPI_FAILURE(status)) { | 792 | if (ACPI_FAILURE(status)) { |
| 793 | acpi_remove_gpe_handler(NULL, ec->gpe_bit, | 793 | acpi_remove_gpe_handler(NULL, ec->gpe, |
| 794 | &acpi_ec_gpe_handler); | 794 | &acpi_ec_gpe_handler); |
| 795 | return -ENODEV; | 795 | return -ENODEV; |
| 796 | } | 796 | } |
| @@ -816,7 +816,7 @@ static int acpi_ec_stop(struct acpi_device *device, int type) | |||
| 816 | return -ENODEV; | 816 | return -ENODEV; |
| 817 | 817 | ||
| 818 | status = | 818 | status = |
| 819 | acpi_remove_gpe_handler(NULL, ec->gpe_bit, | 819 | acpi_remove_gpe_handler(NULL, ec->gpe, |
| 820 | &acpi_ec_gpe_handler); | 820 | &acpi_ec_gpe_handler); |
| 821 | if (ACPI_FAILURE(status)) | 821 | if (ACPI_FAILURE(status)) |
| 822 | return -ENODEV; | 822 | return -ENODEV; |
| @@ -844,14 +844,14 @@ acpi_fake_ecdt_callback(acpi_handle handle, | |||
| 844 | 844 | ||
| 845 | status = | 845 | status = |
| 846 | acpi_evaluate_integer(handle, "_GPE", NULL, | 846 | acpi_evaluate_integer(handle, "_GPE", NULL, |
| 847 | &ec_ecdt->gpe_bit); | 847 | &ec_ecdt->gpe); |
| 848 | if (ACPI_FAILURE(status)) | 848 | if (ACPI_FAILURE(status)) |
| 849 | return status; | 849 | return status; |
| 850 | ec_ecdt->global_lock = TRUE; | 850 | ec_ecdt->global_lock = TRUE; |
| 851 | ec_ecdt->handle = handle; | 851 | ec_ecdt->handle = handle; |
| 852 | 852 | ||
| 853 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "GPE=0x%02lx, ports=0x%2lx, 0x%2lx", | 853 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "GPE=0x%02lx, ports=0x%2lx, 0x%2lx", |
| 854 | ec_ecdt->gpe_bit, ec_ecdt->command_addr, ec_ecdt->data_addr)); | 854 | ec_ecdt->gpe, ec_ecdt->command_addr, ec_ecdt->data_addr)); |
| 855 | 855 | ||
| 856 | return AE_CTRL_TERMINATE; | 856 | return AE_CTRL_TERMINATE; |
| 857 | } | 857 | } |
| @@ -921,7 +921,7 @@ static int __init acpi_ec_get_real_ecdt(void) | |||
| 921 | } | 921 | } |
| 922 | ec_ecdt->command_addr = ecdt_ptr->ec_control.address; | 922 | ec_ecdt->command_addr = ecdt_ptr->ec_control.address; |
| 923 | ec_ecdt->data_addr = ecdt_ptr->ec_data.address; | 923 | ec_ecdt->data_addr = ecdt_ptr->ec_data.address; |
| 924 | ec_ecdt->gpe_bit = ecdt_ptr->gpe_bit; | 924 | ec_ecdt->gpe = ecdt_ptr->gpe_bit; |
| 925 | /* use the GL just to be safe */ | 925 | /* use the GL just to be safe */ |
| 926 | ec_ecdt->global_lock = TRUE; | 926 | ec_ecdt->global_lock = TRUE; |
| 927 | ec_ecdt->uid = ecdt_ptr->uid; | 927 | ec_ecdt->uid = ecdt_ptr->uid; |
| @@ -959,14 +959,14 @@ int __init acpi_ec_ecdt_probe(void) | |||
| 959 | /* | 959 | /* |
| 960 | * Install GPE handler | 960 | * Install GPE handler |
| 961 | */ | 961 | */ |
| 962 | status = acpi_install_gpe_handler(NULL, ec_ecdt->gpe_bit, | 962 | status = acpi_install_gpe_handler(NULL, ec_ecdt->gpe, |
| 963 | ACPI_GPE_EDGE_TRIGGERED, | 963 | ACPI_GPE_EDGE_TRIGGERED, |
| 964 | &acpi_ec_gpe_handler, ec_ecdt); | 964 | &acpi_ec_gpe_handler, ec_ecdt); |
| 965 | if (ACPI_FAILURE(status)) { | 965 | if (ACPI_FAILURE(status)) { |
| 966 | goto error; | 966 | goto error; |
| 967 | } | 967 | } |
| 968 | acpi_set_gpe_type(NULL, ec_ecdt->gpe_bit, ACPI_GPE_TYPE_RUNTIME); | 968 | acpi_set_gpe_type(NULL, ec_ecdt->gpe, ACPI_GPE_TYPE_RUNTIME); |
| 969 | acpi_enable_gpe(NULL, ec_ecdt->gpe_bit, ACPI_NOT_ISR); | 969 | acpi_enable_gpe(NULL, ec_ecdt->gpe, ACPI_NOT_ISR); |
| 970 | 970 | ||
| 971 | status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT, | 971 | status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT, |
| 972 | ACPI_ADR_SPACE_EC, | 972 | ACPI_ADR_SPACE_EC, |
| @@ -974,7 +974,7 @@ int __init acpi_ec_ecdt_probe(void) | |||
| 974 | &acpi_ec_space_setup, | 974 | &acpi_ec_space_setup, |
| 975 | ec_ecdt); | 975 | ec_ecdt); |
| 976 | if (ACPI_FAILURE(status)) { | 976 | if (ACPI_FAILURE(status)) { |
| 977 | acpi_remove_gpe_handler(NULL, ec_ecdt->gpe_bit, | 977 | acpi_remove_gpe_handler(NULL, ec_ecdt->gpe, |
| 978 | &acpi_ec_gpe_handler); | 978 | &acpi_ec_gpe_handler); |
| 979 | goto error; | 979 | goto error; |
| 980 | } | 980 | } |
