[PATCH 1/3] ACPICA: Introduce ACPI_ACCESS_BIT_WIDTH() macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
---
 include/acpi/actypes.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index a2583c2bc054..77d40b02f62a 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -537,6 +537,7 @@ typedef u64 acpi_integer;
  * struct acpi_resource_generic_register.
  */
 #define ACPI_ACCESS_BIT_WIDTH(size)     (1 << ((size) + 2))
+#define ACPI_ACCESS_BYTE_WIDTH(size)    (ACPI_ACCESS_BIT_WIDTH(size) / 8)
 
 /*******************************************************************************
  *
-- 
2.25.0




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux