summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Qasim Abdul Majeed <qasim.majeed20@gmail.com>2024-08-04 15:33:13 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-08-26 20:11:59 +0300
commit1b9c2e94df1408e567f23641f6052af9a75614d1 (patch)
tree9a7ed69e3e768f46d9306b9ed23365350db1e37b
parentf70ae2df130d8f8c70aea618b1b1b901163b9676 (diff)
downloadlinux-1b9c2e94df1408e567f23641f6052af9a75614d1.tar.xz
ACPI: bus: Define and use symbols for device and class name lengths
It is better to define symbols for the maximum ACPI device name length and the maximum ACPI class name length instead of using raw numbers in typedef statements. Signed-off-by: Muhammad Qasim Abdul Majeed <qasim.majeed20@gmail.com> Link: https://patch.msgid.link/20240804123313.16211-6-qasim.majeed20@gmail.com [ rjw: Subject edits, added a changelog, dropped unrelated change ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--include/acpi/acpi_bus.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 8db5bd382915..049cbda28c4c 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -228,10 +228,12 @@ struct acpi_device_dir {
/* Plug and Play */
+#define MAX_ACPI_DEVICE_NAME_LEN 40
+#define MAX_ACPI_CLASS_NAME_LEN 20
typedef char acpi_bus_id[8];
typedef u64 acpi_bus_address;
-typedef char acpi_device_name[40];
-typedef char acpi_device_class[20];
+typedef char acpi_device_name[MAX_ACPI_DEVICE_NAME_LEN];
+typedef char acpi_device_class[MAX_ACPI_CLASS_NAME_LEN];
struct acpi_hardware_id {
struct list_head list;