Pārlūkot izejas kodu

ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro

This patch introduces ACPI_IS_ALIGNED() macro. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Lv Zheng 9 gadi atpakaļ
vecāks
revīzija
e35d75024b
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      drivers/acpi/acpica/acmacros.h

+ 2 - 1
drivers/acpi/acpica/acmacros.h

@@ -262,7 +262,8 @@
 
 /* Generic (power-of-two) rounding */
 
-#define ACPI_IS_POWER_OF_TWO(a)             (((a) & ((a) - 1)) == 0)
+#define ACPI_IS_ALIGNED(a, s)               (((a) & ((s) - 1)) == 0)
+#define ACPI_IS_POWER_OF_TWO(a)             ACPI_IS_ALIGNED(a, a)
 
 /*
  * Bitmask creation