summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/evgpe.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-06-08 10:48:26 +0200
committerLen Brown <len.brown@intel.com>2010-06-11 18:54:54 -0400
commite4e9a735991c80fb0fc1bd4a13a93681c3c17ce0 (patch)
treedbe98206d9fe79c744e354ab2f4f6dd2473406ed /drivers/acpi/acpica/evgpe.c
parenta997ab332832519c2e292db13f509e4360495a5a (diff)
downloadop-kernel-dev-e4e9a735991c80fb0fc1bd4a13a93681c3c17ce0.zip
op-kernel-dev-e4e9a735991c80fb0fc1bd4a13a93681c3c17ce0.tar.gz
ACPI / ACPICA: Use helper function for computing GPE masks
In quite a few places ACPICA needs to compute a GPE enable mask with only one bit, corresponding to a given GPE, set. Currently, that computation is always open coded which leads to unnecessary code duplication. Fix this by introducing a helper function for computing one-bit GPE enable masks and using it where appropriate. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/evgpe.c')
-rw-r--r--drivers/acpi/acpica/evgpe.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index deb26f4..57eeb3b 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -69,7 +69,7 @@ acpi_status
acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info)
{
struct acpi_gpe_register_info *gpe_register_info;
- u8 register_bit;
+ u32 register_bit;
ACPI_FUNCTION_TRACE(ev_update_gpe_enable_masks);
@@ -78,9 +78,8 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info)
return_ACPI_STATUS(AE_NOT_EXIST);
}
- register_bit = (u8)
- (1 <<
- (gpe_event_info->gpe_number - gpe_register_info->base_gpe_number));
+ register_bit = acpi_hw_gpe_register_bit(gpe_event_info,
+ gpe_register_info);
/* Clear the wake/run bits up front */
OpenPOWER on IntegriCloud