diff options
Diffstat (limited to 'drivers/acpi/hardware')
-rw-r--r-- | drivers/acpi/hardware/hwgpe.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c index 608a3a60ee11..3d548b5b0dd5 100644 --- a/drivers/acpi/hardware/hwgpe.c +++ b/drivers/acpi/hardware/hwgpe.c | |||
@@ -105,14 +105,20 @@ acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info) | |||
105 | acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info) | 105 | acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info) |
106 | { | 106 | { |
107 | acpi_status status; | 107 | acpi_status status; |
108 | u8 register_bit; | ||
108 | 109 | ||
109 | ACPI_FUNCTION_ENTRY(); | 110 | ACPI_FUNCTION_ENTRY(); |
110 | 111 | ||
112 | register_bit = (u8) | ||
113 | (1 << | ||
114 | (gpe_event_info->gpe_number - | ||
115 | gpe_event_info->register_info->base_gpe_number)); | ||
116 | |||
111 | /* | 117 | /* |
112 | * Write a one to the appropriate bit in the status register to | 118 | * Write a one to the appropriate bit in the status register to |
113 | * clear this GPE. | 119 | * clear this GPE. |
114 | */ | 120 | */ |
115 | status = acpi_hw_low_level_write(8, gpe_event_info->register_bit, | 121 | status = acpi_hw_low_level_write(8, register_bit, |
116 | &gpe_event_info->register_info-> | 122 | &gpe_event_info->register_info-> |
117 | status_address); | 123 | status_address); |
118 | 124 | ||
@@ -155,7 +161,10 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info, | |||
155 | 161 | ||
156 | /* Get the register bitmask for this GPE */ | 162 | /* Get the register bitmask for this GPE */ |
157 | 163 | ||
158 | register_bit = gpe_event_info->register_bit; | 164 | register_bit = (u8) |
165 | (1 << | ||
166 | (gpe_event_info->gpe_number - | ||
167 | gpe_event_info->register_info->base_gpe_number)); | ||
159 | 168 | ||
160 | /* GPE currently enabled? (enabled for runtime?) */ | 169 | /* GPE currently enabled? (enabled for runtime?) */ |
161 | 170 | ||