diff mbox series

[v2,6/6] ACPI: bus: Define and use a macro for device and class name length.

Message ID 20240804123313.16211-6-qasim.majeed20@gmail.com
State New
Headers show
Series [v2,1/6] ACPI: ac: Use strscpy() instead of strcpy(). | expand

Commit Message

Muhammad Qasim Abdul Majeed Aug. 4, 2024, 12:33 p.m. UTC
Signed-off-by: Muhammad Qasim Abdul Majeed <qasim.majeed20@gmail.com>
---
 include/acpi/acpi_bus.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 1a4dfd7a1c4a..74ed1170fe66 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -226,11 +226,12 @@  struct acpi_device_dir {
 #define acpi_device_dir(d)	((d)->dir.entry)
 
 /* 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;