diff options
author | Lv Zheng <lv.zheng@intel.com> | 2016-05-05 06:58:32 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-05-05 15:22:27 +0200 |
commit | e35d75024b28083b0a84cdb73b826f8450b29d49 (patch) | |
tree | 0395f9d8c7a603243011ba6985631bde0ba8cdfb /drivers/acpi/acpica/acmacros.h | |
parent | ACPICA: Renamed some #defined flag constants for clarity (diff) | |
download | linux-e35d75024b28083b0a84cdb73b826f8450b29d49.tar.xz linux-e35d75024b28083b0a84cdb73b826f8450b29d49.zip |
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>
Diffstat (limited to 'drivers/acpi/acpica/acmacros.h')
-rw-r--r-- | drivers/acpi/acpica/acmacros.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h index 73f6653c848d..ecbaabae59e7 100644 --- a/drivers/acpi/acpica/acmacros.h +++ b/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 |