aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/exutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/exutils.c')
-rw-r--r--drivers/acpi/acpica/exutils.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c
index 3f4225e95d93..30c3f464fda5 100644
--- a/drivers/acpi/acpica/exutils.c
+++ b/drivers/acpi/acpica/exutils.c
@@ -380,6 +380,38 @@ void acpi_ex_integer_to_string(char *out_string, u64 value)
380 380
381/******************************************************************************* 381/*******************************************************************************
382 * 382 *
383 * FUNCTION: acpi_ex_pci_cls_to_string
384 *
385 * PARAMETERS: out_string - Where to put the converted string (7 bytes)
386 * PARAMETERS: class_code - PCI class code to be converted (3 bytes)
387 *
388 * RETURN: None
389 *
390 * DESCRIPTION: Convert 3-bytes PCI class code to string representation.
391 * Return buffer must be large enough to hold the string. The
392 * string returned is always exactly of length
393 * ACPI_PCICLS_STRING_SIZE (includes null terminator).
394 *
395 ******************************************************************************/
396
397void acpi_ex_pci_cls_to_string(char *out_string, u8 class_code[3])
398{
399
400 ACPI_FUNCTION_ENTRY();
401
402 /* All 3 bytes are hexadecimal */
403
404 out_string[0] = acpi_ut_hex_to_ascii_char((u64)class_code[0], 4);
405 out_string[1] = acpi_ut_hex_to_ascii_char((u64)class_code[0], 0);
406 out_string[2] = acpi_ut_hex_to_ascii_char((u64)class_code[1], 4);
407 out_string[3] = acpi_ut_hex_to_ascii_char((u64)class_code[1], 0);
408 out_string[4] = acpi_ut_hex_to_ascii_char((u64)class_code[2], 4);
409 out_string[5] = acpi_ut_hex_to_ascii_char((u64)class_code[2], 0);
410 out_string[6] = 0;
411}
412
413/*******************************************************************************
414 *
383 * FUNCTION: acpi_is_valid_space_id 415 * FUNCTION: acpi_is_valid_space_id
384 * 416 *
385 * PARAMETERS: space_id - ID to be validated 417 * PARAMETERS: space_id - ID to be validated