Skip to content

Commit 1dade3a

Browse files
westerirafaeljw
authored andcommitted
ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro
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 <[email protected]> Signed-off-by: Mika Westerberg <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Cc: 4.16+ <[email protected]> # 4.16+ Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 3f9e12e commit 1dade3a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/acpi/actypes.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,12 @@ typedef u64 acpi_integer;
532532
strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE)
533533

534534
/*
535-
* Algorithm to obtain access bit width.
535+
* Algorithm to obtain access bit or byte width.
536536
* Can be used with access_width of struct acpi_generic_address and access_size of
537537
* struct acpi_resource_generic_register.
538538
*/
539539
#define ACPI_ACCESS_BIT_WIDTH(size) (1 << ((size) + 2))
540+
#define ACPI_ACCESS_BYTE_WIDTH(size) (1 << ((size) - 1))
540541

541542
/*******************************************************************************
542543
*

0 commit comments

Comments
 (0)