diff options
Diffstat (limited to 'drivers/acpi/hardware/hwgpe.c')
-rw-r--r-- | drivers/acpi/hardware/hwgpe.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c index 608a3a60ee11..117a05cadaaa 100644 --- a/drivers/acpi/hardware/hwgpe.c +++ b/drivers/acpi/hardware/hwgpe.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2006, R. Byron Moore | 9 | * Copyright (C) 2000 - 2007, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -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 | ||