浏览代码

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 年之前
父节点
当前提交
e35d75024b
共有 1 个文件被更改,包括 2 次插入1 次删除
  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