diff options
Diffstat (limited to 'drivers/acpi/acpica/exutils.c')
-rw-r--r-- | drivers/acpi/acpica/exutils.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c index 8ad93146dd32..eb6798ba8b59 100644 --- a/drivers/acpi/acpica/exutils.c +++ b/drivers/acpi/acpica/exutils.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2011, Intel Corp. | 9 | * Copyright (C) 2000 - 2012, Intel Corp. |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -435,4 +435,29 @@ void acpi_ex_integer_to_string(char *out_string, u64 value) | |||
435 | } | 435 | } |
436 | } | 436 | } |
437 | 437 | ||
438 | /******************************************************************************* | ||
439 | * | ||
440 | * FUNCTION: acpi_is_valid_space_id | ||
441 | * | ||
442 | * PARAMETERS: space_id - ID to be validated | ||
443 | * | ||
444 | * RETURN: TRUE if valid/supported ID. | ||
445 | * | ||
446 | * DESCRIPTION: Validate an operation region space_iD. | ||
447 | * | ||
448 | ******************************************************************************/ | ||
449 | |||
450 | u8 acpi_is_valid_space_id(u8 space_id) | ||
451 | { | ||
452 | |||
453 | if ((space_id >= ACPI_NUM_PREDEFINED_REGIONS) && | ||
454 | (space_id < ACPI_USER_REGION_BEGIN) && | ||
455 | (space_id != ACPI_ADR_SPACE_DATA_TABLE) && | ||
456 | (space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) { | ||
457 | return (FALSE); | ||
458 | } | ||
459 | |||
460 | return (TRUE); | ||
461 | } | ||
462 | |||
438 | #endif | 463 | #endif |