diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2020-02-12 17:59:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-11 20:02:48 +0300 |
commit | 0a94e100b4fe9bd250e2c1f7624a70de2cdf4bc8 (patch) | |
tree | 74fb738ebbe8c2df2030089315ab7e8f23247b72 /include | |
parent | edde9fcd5f41b2e22e455250214de0c4b126b255 (diff) | |
download | linux-0a94e100b4fe9bd250e2c1f7624a70de2cdf4bc8.tar.xz |
ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro
commit 1dade3a7048ccfc675650cd2cf13d578b095e5fb upstream.
Sometimes it is useful to find the access_width field value in bytes and
not in bits so add a helper that can be used for this purpose.
Suggested-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Cc: 4.16+ <stable@vger.kernel.org> # 4.16+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/actypes.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 4f077edb9b81..71fadbe77e21 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -556,11 +556,12 @@ typedef u64 acpi_integer; #define ACPI_MAKE_RSDP_SIG(dest) (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8)) /* - * Algorithm to obtain access bit width. + * Algorithm to obtain access bit or byte width. * Can be used with access_width of struct acpi_generic_address and access_size of * struct acpi_resource_generic_register. */ #define ACPI_ACCESS_BIT_WIDTH(size) (1 << ((size) + 2)) +#define ACPI_ACCESS_BYTE_WIDTH(size) (1 << ((size) - 1)) /******************************************************************************* * |