aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/tbfadt.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2009-02-18 02:03:30 -0500
committerLen Brown <len.brown@intel.com>2009-03-26 16:38:29 -0400
commitec41f193eadb6301f3c052b5e0dbc0b5636982e8 (patch)
tree9fd86c3b86925fc21868ca6f7e6bd6a0ecbf1d46 /drivers/acpi/acpica/tbfadt.c
parent7bcc06e845479bde939059bafa088bf25ede9dbf (diff)
ACPICA: Formatting update - no functional changes
Split some long lines. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/tbfadt.c')
-rw-r--r--drivers/acpi/acpica/tbfadt.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
index 43fe886b41a2..af8fbe12d8b7 100644
--- a/drivers/acpi/acpica/tbfadt.c
+++ b/drivers/acpi/acpica/tbfadt.c
@@ -132,7 +132,8 @@ static struct acpi_fadt_info fadt_info_table[] = {
132 ACPI_FADT_SEPARATE_LENGTH} 132 ACPI_FADT_SEPARATE_LENGTH}
133}; 133};
134 134
135#define ACPI_FADT_INFO_ENTRIES (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info)) 135#define ACPI_FADT_INFO_ENTRIES \
136 (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info))
136 137
137/* Table used to split Event Blocks into separate status/enable registers */ 138/* Table used to split Event Blocks into separate status/enable registers */
138 139
@@ -161,7 +162,8 @@ static struct acpi_fadt_pm_info fadt_pm_info_table[] = {
161 1} 162 1}
162}; 163};
163 164
164#define ACPI_FADT_PM_INFO_ENTRIES (sizeof (fadt_pm_info_table) / sizeof (struct acpi_fadt_pm_info)) 165#define ACPI_FADT_PM_INFO_ENTRIES \
166 (sizeof (fadt_pm_info_table) / sizeof (struct acpi_fadt_pm_info))
165 167
166/******************************************************************************* 168/*******************************************************************************
167 * 169 *
@@ -416,7 +418,7 @@ static void acpi_tb_convert_fadt(void)
416 } 418 }
417} 419}
418 420
419/****************************************************************************** 421/*******************************************************************************
420 * 422 *
421 * FUNCTION: acpi_tb_validate_fadt 423 * FUNCTION: acpi_tb_validate_fadt
422 * 424 *
@@ -503,7 +505,8 @@ static void acpi_tb_validate_fadt(void)
503 */ 505 */
504 if (!address64->address || !length) { 506 if (!address64->address || !length) {
505 ACPI_ERROR((AE_INFO, 507 ACPI_ERROR((AE_INFO,
506 "Required field %s has zero address and/or length: %8.8X%8.8X/%X", 508 "Required field %s has zero address and/or length:"
509 " %8.8X%8.8X/%X",
507 name, 510 name,
508 ACPI_FORMAT_UINT64(address64-> 511 ACPI_FORMAT_UINT64(address64->
509 address), 512 address),
@@ -512,12 +515,14 @@ static void acpi_tb_validate_fadt(void)
512 } else if (fadt_info_table[i].type & ACPI_FADT_SEPARATE_LENGTH) { 515 } else if (fadt_info_table[i].type & ACPI_FADT_SEPARATE_LENGTH) {
513 /* 516 /*
514 * Field is optional (PM2Control, GPE0, GPE1) AND has its own 517 * Field is optional (PM2Control, GPE0, GPE1) AND has its own
515 * length field. If present, both the address and length must be valid. 518 * length field. If present, both the address and length must
519 * be valid.
516 */ 520 */
517 if ((address64->address && !length) 521 if ((address64->address && !length) ||
518 || (!address64->address && length)) { 522 (!address64->address && length)) {
519 ACPI_WARNING((AE_INFO, 523 ACPI_WARNING((AE_INFO,
520 "Optional field %s has zero address or length: %8.8X%8.8X/%X", 524 "Optional field %s has zero address or length: "
525 "%8.8X%8.8X/%X",
521 name, 526 name,
522 ACPI_FORMAT_UINT64(address64-> 527 ACPI_FORMAT_UINT64(address64->
523 address), 528 address),
@@ -525,8 +530,10 @@ static void acpi_tb_validate_fadt(void)
525 } 530 }
526 } 531 }
527 532
528 /* If both 32- and 64-bit addresses are valid (non-zero), they must match */ 533 /*
529 534 * If both 32- and 64-bit addresses are valid (non-zero),
535 * they must match
536 */
530 if (address64->address && *address32 && 537 if (address64->address && *address32 &&
531 (address64->address != (u64) * address32)) { 538 (address64->address != (u64) * address32)) {
532 ACPI_ERROR((AE_INFO, 539 ACPI_ERROR((AE_INFO,
@@ -537,7 +544,7 @@ static void acpi_tb_validate_fadt(void)
537 } 544 }
538} 545}
539 546
540/****************************************************************************** 547/*******************************************************************************
541 * 548 *
542 * FUNCTION: acpi_tb_setup_fadt_registers 549 * FUNCTION: acpi_tb_setup_fadt_registers
543 * 550 *
@@ -596,8 +603,8 @@ static void acpi_tb_setup_fadt_registers(void)
596 * Each register is defined to be (event block length / 2). Extra divide 603 * Each register is defined to be (event block length / 2). Extra divide
597 * by 8 converts bits to bytes. 604 * by 8 converts bits to bytes.
598 */ 605 */
599 pm1_register_byte_width = 606 pm1_register_byte_width = (u8)
600 (u8)ACPI_DIV_16(acpi_gbl_FADT.xpm1a_event_block.bit_width); 607 ACPI_DIV_16(acpi_gbl_FADT.xpm1a_event_block.bit_width);
601 608
602 /* 609 /*
603 * Calculate separate GAS structs for the PM1x (A/B) Status and Enable 610 * Calculate separate GAS structs for the PM1x (A/B) Status and Enable