diff options
author | Vladimir Lebedev <vladimir.p.lebedev@intel.com> | 2007-03-19 10:45:50 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-03-22 01:15:58 -0400 |
commit | 6845118b3b7a9cc2ba14dc665370217bc3ba8057 (patch) | |
tree | bed97be5fddbf53a6cf8e538cadf08623121cbae /drivers/acpi | |
parent | 84cb55987236ffea062a35fbe1441768b6bb2722 (diff) |
ACPI: sbs: Debug messages correction/improvement
Debug messages correction/improvement:
Use ACPI_EXCEPTION instead of ACPI_DEBUG_PRINT.
Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/sbs.c | 299 |
1 files changed, 149 insertions, 150 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index eab5c680a6ac..395664528dd1 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -271,7 +271,7 @@ acpi_ec_sbs_access(struct acpi_sbs *sbs, u16 addr, | |||
271 | break; | 271 | break; |
272 | default: | 272 | default: |
273 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, | 273 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
274 | "unsupported transaction %d\n", size)); | 274 | "unsupported transaction %d", size)); |
275 | return (-1); | 275 | return (-1); |
276 | } | 276 | } |
277 | 277 | ||
@@ -291,7 +291,7 @@ acpi_ec_sbs_access(struct acpi_sbs *sbs, u16 addr, | |||
291 | if ((~temp[0] & ACPI_EC_SMB_STS_DONE) | 291 | if ((~temp[0] & ACPI_EC_SMB_STS_DONE) |
292 | || (temp[0] & ACPI_EC_SMB_STS_STATUS)) { | 292 | || (temp[0] & ACPI_EC_SMB_STS_STATUS)) { |
293 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, | 293 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
294 | "transaction %d error\n", size)); | 294 | "transaction %d error", size)); |
295 | return (-1); | 295 | return (-1); |
296 | } | 296 | } |
297 | 297 | ||
@@ -318,7 +318,7 @@ acpi_ec_sbs_access(struct acpi_sbs *sbs, u16 addr, | |||
318 | break; | 318 | break; |
319 | default: | 319 | default: |
320 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, | 320 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
321 | "unsupported transaction %d\n", size)); | 321 | "unsupported transaction %d", size)); |
322 | return (-1); | 322 | return (-1); |
323 | } | 323 | } |
324 | 324 | ||
@@ -335,8 +335,8 @@ acpi_sbs_read_word(struct acpi_sbs *sbs, int addr, int func, u16 * word) | |||
335 | ACPI_SBS_SMBUS_READ, func, | 335 | ACPI_SBS_SMBUS_READ, func, |
336 | ACPI_SBS_WORD_DATA, &data); | 336 | ACPI_SBS_WORD_DATA, &data); |
337 | if (result) { | 337 | if (result) { |
338 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 338 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
339 | "acpi_ec_sbs_access() failed\n")); | 339 | "acpi_ec_sbs_access() failed")); |
340 | } else { | 340 | } else { |
341 | *word = data.word; | 341 | *word = data.word; |
342 | } | 342 | } |
@@ -354,8 +354,8 @@ acpi_sbs_read_str(struct acpi_sbs *sbs, int addr, int func, char *str) | |||
354 | ACPI_SBS_SMBUS_READ, func, | 354 | ACPI_SBS_SMBUS_READ, func, |
355 | ACPI_SBS_BLOCK_DATA, &data); | 355 | ACPI_SBS_BLOCK_DATA, &data); |
356 | if (result) { | 356 | if (result) { |
357 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 357 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
358 | "acpi_ec_sbs_access() failed\n")); | 358 | "acpi_ec_sbs_access() failed")); |
359 | } else { | 359 | } else { |
360 | strncpy(str, (const char *)data.block + 1, data.block[0]); | 360 | strncpy(str, (const char *)data.block + 1, data.block[0]); |
361 | str[data.block[0]] = 0; | 361 | str[data.block[0]] = 0; |
@@ -376,8 +376,8 @@ acpi_sbs_write_word(struct acpi_sbs *sbs, int addr, int func, int word) | |||
376 | ACPI_SBS_SMBUS_WRITE, func, | 376 | ACPI_SBS_SMBUS_WRITE, func, |
377 | ACPI_SBS_WORD_DATA, &data); | 377 | ACPI_SBS_WORD_DATA, &data); |
378 | if (result) { | 378 | if (result) { |
379 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 379 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
380 | "acpi_ec_sbs_access() failed\n")); | 380 | "acpi_ec_sbs_access() failed")); |
381 | } | 381 | } |
382 | 382 | ||
383 | return result; | 383 | return result; |
@@ -419,8 +419,8 @@ static int acpi_battery_get_present(struct acpi_battery *battery) | |||
419 | result = acpi_sbs_read_word(battery->sbs, | 419 | result = acpi_sbs_read_word(battery->sbs, |
420 | ACPI_SBSM_SMBUS_ADDR, 0x01, &state); | 420 | ACPI_SBSM_SMBUS_ADDR, 0x01, &state); |
421 | if (result) { | 421 | if (result) { |
422 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 422 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
423 | "acpi_sbs_read_word() failed")); | 423 | "acpi_sbs_read_word() failed")); |
424 | } | 424 | } |
425 | if (!result) { | 425 | if (!result) { |
426 | is_present = (state & 0x000f) & (1 << battery->id); | 426 | is_present = (state & 0x000f) & (1 << battery->id); |
@@ -456,8 +456,8 @@ static int acpi_battery_select(struct acpi_battery *battery) | |||
456 | result = | 456 | result = |
457 | acpi_sbs_read_word(sbs, ACPI_SBSM_SMBUS_ADDR, 0x01, &state); | 457 | acpi_sbs_read_word(sbs, ACPI_SBSM_SMBUS_ADDR, 0x01, &state); |
458 | if (result) { | 458 | if (result) { |
459 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 459 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
460 | "acpi_sbs_read_word() failed\n")); | 460 | "acpi_sbs_read_word() failed")); |
461 | goto end; | 461 | goto end; |
462 | } | 462 | } |
463 | 463 | ||
@@ -465,8 +465,8 @@ static int acpi_battery_select(struct acpi_battery *battery) | |||
465 | result = | 465 | result = |
466 | acpi_sbs_write_word(sbs, ACPI_SBSM_SMBUS_ADDR, 0x01, foo); | 466 | acpi_sbs_write_word(sbs, ACPI_SBSM_SMBUS_ADDR, 0x01, foo); |
467 | if (result) { | 467 | if (result) { |
468 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 468 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
469 | "acpi_sbs_write_word() failed\n")); | 469 | "acpi_sbs_write_word() failed")); |
470 | goto end; | 470 | goto end; |
471 | } | 471 | } |
472 | } | 472 | } |
@@ -483,8 +483,8 @@ static int acpi_sbsm_get_info(struct acpi_sbs *sbs) | |||
483 | result = acpi_sbs_read_word(sbs, ACPI_SBSM_SMBUS_ADDR, 0x04, | 483 | result = acpi_sbs_read_word(sbs, ACPI_SBSM_SMBUS_ADDR, 0x04, |
484 | &battery_system_info); | 484 | &battery_system_info); |
485 | if (result) { | 485 | if (result) { |
486 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 486 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
487 | "acpi_sbs_read_word() failed\n")); | 487 | "acpi_sbs_read_word() failed")); |
488 | goto end; | 488 | goto end; |
489 | } | 489 | } |
490 | 490 | ||
@@ -505,8 +505,8 @@ static int acpi_battery_get_info(struct acpi_battery *battery) | |||
505 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x03, | 505 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x03, |
506 | &battery_mode); | 506 | &battery_mode); |
507 | if (result) { | 507 | if (result) { |
508 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 508 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
509 | "acpi_sbs_read_word() failed\n")); | 509 | "acpi_sbs_read_word() failed")); |
510 | goto end; | 510 | goto end; |
511 | } | 511 | } |
512 | battery->info.capacity_mode = (battery_mode & 0x8000) >> 15; | 512 | battery->info.capacity_mode = (battery_mode & 0x8000) >> 15; |
@@ -514,8 +514,8 @@ static int acpi_battery_get_info(struct acpi_battery *battery) | |||
514 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x10, | 514 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x10, |
515 | &battery->info.full_charge_capacity); | 515 | &battery->info.full_charge_capacity); |
516 | if (result) { | 516 | if (result) { |
517 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 517 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
518 | "acpi_sbs_read_word() failed\n")); | 518 | "acpi_sbs_read_word() failed")); |
519 | goto end; | 519 | goto end; |
520 | } | 520 | } |
521 | 521 | ||
@@ -529,16 +529,16 @@ static int acpi_battery_get_info(struct acpi_battery *battery) | |||
529 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x19, | 529 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x19, |
530 | &battery->info.design_voltage); | 530 | &battery->info.design_voltage); |
531 | if (result) { | 531 | if (result) { |
532 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 532 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
533 | "acpi_sbs_read_word() failed\n")); | 533 | "acpi_sbs_read_word() failed")); |
534 | goto end; | 534 | goto end; |
535 | } | 535 | } |
536 | 536 | ||
537 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x1a, | 537 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x1a, |
538 | &specification_info); | 538 | &specification_info); |
539 | if (result) { | 539 | if (result) { |
540 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 540 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
541 | "acpi_sbs_read_word() failed\n")); | 541 | "acpi_sbs_read_word() failed")); |
542 | goto end; | 542 | goto end; |
543 | } | 543 | } |
544 | 544 | ||
@@ -579,24 +579,24 @@ static int acpi_battery_get_info(struct acpi_battery *battery) | |||
579 | result = acpi_sbs_read_str(sbs, ACPI_SB_SMBUS_ADDR, 0x20, | 579 | result = acpi_sbs_read_str(sbs, ACPI_SB_SMBUS_ADDR, 0x20, |
580 | battery->info.manufacturer_name); | 580 | battery->info.manufacturer_name); |
581 | if (result) { | 581 | if (result) { |
582 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 582 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
583 | "acpi_sbs_read_str() failed\n")); | 583 | "acpi_sbs_read_str() failed")); |
584 | goto end; | 584 | goto end; |
585 | } | 585 | } |
586 | 586 | ||
587 | result = acpi_sbs_read_str(sbs, ACPI_SB_SMBUS_ADDR, 0x21, | 587 | result = acpi_sbs_read_str(sbs, ACPI_SB_SMBUS_ADDR, 0x21, |
588 | battery->info.device_name); | 588 | battery->info.device_name); |
589 | if (result) { | 589 | if (result) { |
590 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 590 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
591 | "acpi_sbs_read_str() failed\n")); | 591 | "acpi_sbs_read_str() failed")); |
592 | goto end; | 592 | goto end; |
593 | } | 593 | } |
594 | 594 | ||
595 | result = acpi_sbs_read_str(sbs, ACPI_SB_SMBUS_ADDR, 0x22, | 595 | result = acpi_sbs_read_str(sbs, ACPI_SB_SMBUS_ADDR, 0x22, |
596 | battery->info.device_chemistry); | 596 | battery->info.device_chemistry); |
597 | if (result) { | 597 | if (result) { |
598 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 598 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
599 | "acpi_sbs_read_str() failed\n")); | 599 | "acpi_sbs_read_str() failed")); |
600 | goto end; | 600 | goto end; |
601 | } | 601 | } |
602 | 602 | ||
@@ -623,8 +623,8 @@ static int acpi_battery_get_state(struct acpi_battery *battery) | |||
623 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x09, | 623 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x09, |
624 | &battery->state.voltage); | 624 | &battery->state.voltage); |
625 | if (result) { | 625 | if (result) { |
626 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 626 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
627 | "acpi_sbs_read_word() failed\n")); | 627 | "acpi_sbs_read_word() failed")); |
628 | goto end; | 628 | goto end; |
629 | } | 629 | } |
630 | 630 | ||
@@ -632,8 +632,8 @@ static int acpi_battery_get_state(struct acpi_battery *battery) | |||
632 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x0a, | 632 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x0a, |
633 | &battery->state.amperage); | 633 | &battery->state.amperage); |
634 | if (result) { | 634 | if (result) { |
635 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 635 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
636 | "acpi_sbs_read_word() failed\n")); | 636 | "acpi_sbs_read_word() failed")); |
637 | goto end; | 637 | goto end; |
638 | } | 638 | } |
639 | 639 | ||
@@ -641,8 +641,8 @@ static int acpi_battery_get_state(struct acpi_battery *battery) | |||
641 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x0f, | 641 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x0f, |
642 | &battery->state.remaining_capacity); | 642 | &battery->state.remaining_capacity); |
643 | if (result) { | 643 | if (result) { |
644 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 644 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
645 | "acpi_sbs_read_word() failed\n")); | 645 | "acpi_sbs_read_word() failed")); |
646 | goto end; | 646 | goto end; |
647 | } | 647 | } |
648 | 648 | ||
@@ -650,8 +650,8 @@ static int acpi_battery_get_state(struct acpi_battery *battery) | |||
650 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x12, | 650 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x12, |
651 | &battery->state.average_time_to_empty); | 651 | &battery->state.average_time_to_empty); |
652 | if (result) { | 652 | if (result) { |
653 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 653 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
654 | "acpi_sbs_read_word() failed\n")); | 654 | "acpi_sbs_read_word() failed")); |
655 | goto end; | 655 | goto end; |
656 | } | 656 | } |
657 | 657 | ||
@@ -659,8 +659,8 @@ static int acpi_battery_get_state(struct acpi_battery *battery) | |||
659 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x13, | 659 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x13, |
660 | &battery->state.average_time_to_full); | 660 | &battery->state.average_time_to_full); |
661 | if (result) { | 661 | if (result) { |
662 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 662 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
663 | "acpi_sbs_read_word() failed\n")); | 663 | "acpi_sbs_read_word() failed")); |
664 | goto end; | 664 | goto end; |
665 | } | 665 | } |
666 | 666 | ||
@@ -668,8 +668,8 @@ static int acpi_battery_get_state(struct acpi_battery *battery) | |||
668 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x16, | 668 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x16, |
669 | &battery->state.battery_status); | 669 | &battery->state.battery_status); |
670 | if (result) { | 670 | if (result) { |
671 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 671 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
672 | "acpi_sbs_read_word() failed\n")); | 672 | "acpi_sbs_read_word() failed")); |
673 | goto end; | 673 | goto end; |
674 | } | 674 | } |
675 | 675 | ||
@@ -687,8 +687,8 @@ static int acpi_battery_get_alarm(struct acpi_battery *battery) | |||
687 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x01, | 687 | result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x01, |
688 | &battery->alarm.remaining_capacity); | 688 | &battery->alarm.remaining_capacity); |
689 | if (result) { | 689 | if (result) { |
690 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 690 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
691 | "acpi_sbs_read_word() failed\n")); | 691 | "acpi_sbs_read_word() failed")); |
692 | goto end; | 692 | goto end; |
693 | } | 693 | } |
694 | 694 | ||
@@ -709,8 +709,8 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery, | |||
709 | 709 | ||
710 | result = acpi_battery_select(battery); | 710 | result = acpi_battery_select(battery); |
711 | if (result) { | 711 | if (result) { |
712 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 712 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
713 | "acpi_battery_select() failed\n")); | 713 | "acpi_battery_select() failed")); |
714 | goto end; | 714 | goto end; |
715 | } | 715 | } |
716 | 716 | ||
@@ -721,8 +721,8 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery, | |||
721 | acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x03, | 721 | acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x03, |
722 | &battery_mode); | 722 | &battery_mode); |
723 | if (result) { | 723 | if (result) { |
724 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 724 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
725 | "acpi_sbs_read_word() failed\n")); | 725 | "acpi_sbs_read_word() failed")); |
726 | goto end; | 726 | goto end; |
727 | } | 727 | } |
728 | 728 | ||
@@ -730,8 +730,8 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery, | |||
730 | acpi_sbs_write_word(sbs, ACPI_SB_SMBUS_ADDR, 0x01, | 730 | acpi_sbs_write_word(sbs, ACPI_SB_SMBUS_ADDR, 0x01, |
731 | battery_mode & 0xbfff); | 731 | battery_mode & 0xbfff); |
732 | if (result) { | 732 | if (result) { |
733 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 733 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
734 | "acpi_sbs_write_word() failed\n")); | 734 | "acpi_sbs_write_word() failed")); |
735 | goto end; | 735 | goto end; |
736 | } | 736 | } |
737 | } | 737 | } |
@@ -739,8 +739,8 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery, | |||
739 | foo = alarm / (battery->info.capacity_mode ? 10 : 1); | 739 | foo = alarm / (battery->info.capacity_mode ? 10 : 1); |
740 | result = acpi_sbs_write_word(sbs, ACPI_SB_SMBUS_ADDR, 0x01, foo); | 740 | result = acpi_sbs_write_word(sbs, ACPI_SB_SMBUS_ADDR, 0x01, foo); |
741 | if (result) { | 741 | if (result) { |
742 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 742 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
743 | "acpi_sbs_write_word() failed\n")); | 743 | "acpi_sbs_write_word() failed")); |
744 | goto end; | 744 | goto end; |
745 | } | 745 | } |
746 | 746 | ||
@@ -761,8 +761,8 @@ static int acpi_battery_set_mode(struct acpi_battery *battery) | |||
761 | result = acpi_sbs_read_word(battery->sbs, | 761 | result = acpi_sbs_read_word(battery->sbs, |
762 | ACPI_SB_SMBUS_ADDR, 0x03, &battery_mode); | 762 | ACPI_SB_SMBUS_ADDR, 0x03, &battery_mode); |
763 | if (result) { | 763 | if (result) { |
764 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 764 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
765 | "acpi_sbs_read_word() failed\n")); | 765 | "acpi_sbs_read_word() failed")); |
766 | goto end; | 766 | goto end; |
767 | } | 767 | } |
768 | 768 | ||
@@ -774,16 +774,16 @@ static int acpi_battery_set_mode(struct acpi_battery *battery) | |||
774 | result = acpi_sbs_write_word(battery->sbs, | 774 | result = acpi_sbs_write_word(battery->sbs, |
775 | ACPI_SB_SMBUS_ADDR, 0x03, battery_mode); | 775 | ACPI_SB_SMBUS_ADDR, 0x03, battery_mode); |
776 | if (result) { | 776 | if (result) { |
777 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 777 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
778 | "acpi_sbs_write_word() failed\n")); | 778 | "acpi_sbs_write_word() failed")); |
779 | goto end; | 779 | goto end; |
780 | } | 780 | } |
781 | 781 | ||
782 | result = acpi_sbs_read_word(battery->sbs, | 782 | result = acpi_sbs_read_word(battery->sbs, |
783 | ACPI_SB_SMBUS_ADDR, 0x03, &battery_mode); | 783 | ACPI_SB_SMBUS_ADDR, 0x03, &battery_mode); |
784 | if (result) { | 784 | if (result) { |
785 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 785 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
786 | "acpi_sbs_read_word() failed\n")); | 786 | "acpi_sbs_read_word() failed")); |
787 | goto end; | 787 | goto end; |
788 | } | 788 | } |
789 | 789 | ||
@@ -797,36 +797,36 @@ static int acpi_battery_init(struct acpi_battery *battery) | |||
797 | 797 | ||
798 | result = acpi_battery_select(battery); | 798 | result = acpi_battery_select(battery); |
799 | if (result) { | 799 | if (result) { |
800 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 800 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
801 | "acpi_battery_init() failed\n")); | 801 | "acpi_battery_init() failed")); |
802 | goto end; | 802 | goto end; |
803 | } | 803 | } |
804 | 804 | ||
805 | result = acpi_battery_set_mode(battery); | 805 | result = acpi_battery_set_mode(battery); |
806 | if (result) { | 806 | if (result) { |
807 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 807 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
808 | "acpi_battery_set_mode() failed\n")); | 808 | "acpi_battery_set_mode() failed")); |
809 | goto end; | 809 | goto end; |
810 | } | 810 | } |
811 | 811 | ||
812 | result = acpi_battery_get_info(battery); | 812 | result = acpi_battery_get_info(battery); |
813 | if (result) { | 813 | if (result) { |
814 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 814 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
815 | "acpi_battery_get_info() failed\n")); | 815 | "acpi_battery_get_info() failed")); |
816 | goto end; | 816 | goto end; |
817 | } | 817 | } |
818 | 818 | ||
819 | result = acpi_battery_get_state(battery); | 819 | result = acpi_battery_get_state(battery); |
820 | if (result) { | 820 | if (result) { |
821 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 821 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
822 | "acpi_battery_get_state() failed\n")); | 822 | "acpi_battery_get_state() failed")); |
823 | goto end; | 823 | goto end; |
824 | } | 824 | } |
825 | 825 | ||
826 | result = acpi_battery_get_alarm(battery); | 826 | result = acpi_battery_get_alarm(battery); |
827 | if (result) { | 827 | if (result) { |
828 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 828 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
829 | "acpi_battery_get_alarm() failed\n")); | 829 | "acpi_battery_get_alarm() failed")); |
830 | goto end; | 830 | goto end; |
831 | } | 831 | } |
832 | 832 | ||
@@ -843,8 +843,8 @@ static int acpi_ac_get_present(struct acpi_sbs *sbs) | |||
843 | &charger_status); | 843 | &charger_status); |
844 | 844 | ||
845 | if (result) { | 845 | if (result) { |
846 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 846 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
847 | "acpi_sbs_read_word() failed\n")); | 847 | "acpi_sbs_read_word() failed")); |
848 | goto end; | 848 | goto end; |
849 | } | 849 | } |
850 | 850 | ||
@@ -874,8 +874,8 @@ acpi_sbs_generic_add_fs(struct proc_dir_entry **dir, | |||
874 | if (!*dir) { | 874 | if (!*dir) { |
875 | *dir = proc_mkdir(dir_name, parent_dir); | 875 | *dir = proc_mkdir(dir_name, parent_dir); |
876 | if (!*dir) { | 876 | if (!*dir) { |
877 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 877 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
878 | "proc_mkdir() failed\n")); | 878 | "proc_mkdir() failed")); |
879 | return -ENODEV; | 879 | return -ENODEV; |
880 | } | 880 | } |
881 | (*dir)->owner = THIS_MODULE; | 881 | (*dir)->owner = THIS_MODULE; |
@@ -885,8 +885,8 @@ acpi_sbs_generic_add_fs(struct proc_dir_entry **dir, | |||
885 | if (info_fops) { | 885 | if (info_fops) { |
886 | entry = create_proc_entry(ACPI_SBS_FILE_INFO, S_IRUGO, *dir); | 886 | entry = create_proc_entry(ACPI_SBS_FILE_INFO, S_IRUGO, *dir); |
887 | if (!entry) { | 887 | if (!entry) { |
888 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 888 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
889 | "create_proc_entry() failed\n")); | 889 | "create_proc_entry() failed")); |
890 | } else { | 890 | } else { |
891 | entry->proc_fops = info_fops; | 891 | entry->proc_fops = info_fops; |
892 | entry->data = data; | 892 | entry->data = data; |
@@ -898,8 +898,8 @@ acpi_sbs_generic_add_fs(struct proc_dir_entry **dir, | |||
898 | if (state_fops) { | 898 | if (state_fops) { |
899 | entry = create_proc_entry(ACPI_SBS_FILE_STATE, S_IRUGO, *dir); | 899 | entry = create_proc_entry(ACPI_SBS_FILE_STATE, S_IRUGO, *dir); |
900 | if (!entry) { | 900 | if (!entry) { |
901 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 901 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
902 | "create_proc_entry() failed\n")); | 902 | "create_proc_entry() failed")); |
903 | } else { | 903 | } else { |
904 | entry->proc_fops = state_fops; | 904 | entry->proc_fops = state_fops; |
905 | entry->data = data; | 905 | entry->data = data; |
@@ -911,8 +911,8 @@ acpi_sbs_generic_add_fs(struct proc_dir_entry **dir, | |||
911 | if (alarm_fops) { | 911 | if (alarm_fops) { |
912 | entry = create_proc_entry(ACPI_SBS_FILE_ALARM, S_IRUGO, *dir); | 912 | entry = create_proc_entry(ACPI_SBS_FILE_ALARM, S_IRUGO, *dir); |
913 | if (!entry) { | 913 | if (!entry) { |
914 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 914 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
915 | "create_proc_entry() failed\n")); | 915 | "create_proc_entry() failed")); |
916 | } else { | 916 | } else { |
917 | entry->proc_fops = alarm_fops; | 917 | entry->proc_fops = alarm_fops; |
918 | entry->data = data; | 918 | entry->data = data; |
@@ -957,8 +957,8 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset) | |||
957 | if (update_mode == REQUEST_UPDATE_MODE) { | 957 | if (update_mode == REQUEST_UPDATE_MODE) { |
958 | result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_INFO); | 958 | result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_INFO); |
959 | if (result) { | 959 | if (result) { |
960 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 960 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
961 | "acpi_sbs_update_run() failed\n")); | 961 | "acpi_sbs_update_run() failed")); |
962 | } | 962 | } |
963 | } | 963 | } |
964 | 964 | ||
@@ -1032,8 +1032,8 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) | |||
1032 | if (update_mode == REQUEST_UPDATE_MODE) { | 1032 | if (update_mode == REQUEST_UPDATE_MODE) { |
1033 | result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_STATE); | 1033 | result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_STATE); |
1034 | if (result) { | 1034 | if (result) { |
1035 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1035 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1036 | "acpi_sbs_update_run() failed\n")); | 1036 | "acpi_sbs_update_run() failed")); |
1037 | } | 1037 | } |
1038 | } | 1038 | } |
1039 | 1039 | ||
@@ -1108,8 +1108,8 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) | |||
1108 | if (update_mode == REQUEST_UPDATE_MODE) { | 1108 | if (update_mode == REQUEST_UPDATE_MODE) { |
1109 | result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_ALARM); | 1109 | result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_ALARM); |
1110 | if (result) { | 1110 | if (result) { |
1111 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1111 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1112 | "acpi_sbs_update_run() failed\n")); | 1112 | "acpi_sbs_update_run() failed")); |
1113 | } | 1113 | } |
1114 | } | 1114 | } |
1115 | 1115 | ||
@@ -1177,15 +1177,15 @@ acpi_battery_write_alarm(struct file *file, const char __user * buffer, | |||
1177 | 1177 | ||
1178 | result = acpi_battery_set_alarm(battery, new_alarm); | 1178 | result = acpi_battery_set_alarm(battery, new_alarm); |
1179 | if (result) { | 1179 | if (result) { |
1180 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1180 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1181 | "acpi_battery_set_alarm() failed\n")); | 1181 | "acpi_battery_set_alarm() failed")); |
1182 | acpi_battery_set_alarm(battery, old_alarm); | 1182 | acpi_battery_set_alarm(battery, old_alarm); |
1183 | goto end; | 1183 | goto end; |
1184 | } | 1184 | } |
1185 | result = acpi_battery_get_alarm(battery); | 1185 | result = acpi_battery_get_alarm(battery); |
1186 | if (result) { | 1186 | if (result) { |
1187 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1187 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1188 | "acpi_battery_get_alarm() failed\n")); | 1188 | "acpi_battery_get_alarm() failed")); |
1189 | acpi_battery_set_alarm(battery, old_alarm); | 1189 | acpi_battery_set_alarm(battery, old_alarm); |
1190 | goto end; | 1190 | goto end; |
1191 | } | 1191 | } |
@@ -1248,8 +1248,8 @@ static int acpi_ac_read_state(struct seq_file *seq, void *offset) | |||
1248 | if (update_mode == REQUEST_UPDATE_MODE) { | 1248 | if (update_mode == REQUEST_UPDATE_MODE) { |
1249 | result = acpi_sbs_update_run(sbs, DATA_TYPE_AC_STATE); | 1249 | result = acpi_sbs_update_run(sbs, DATA_TYPE_AC_STATE); |
1250 | if (result) { | 1250 | if (result) { |
1251 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1251 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1252 | "acpi_sbs_update_run() failed\n")); | 1252 | "acpi_sbs_update_run() failed")); |
1253 | } | 1253 | } |
1254 | } | 1254 | } |
1255 | 1255 | ||
@@ -1297,15 +1297,15 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) | |||
1297 | 1297 | ||
1298 | result = acpi_battery_select(battery); | 1298 | result = acpi_battery_select(battery); |
1299 | if (result) { | 1299 | if (result) { |
1300 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1300 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1301 | "acpi_battery_select() failed\n")); | 1301 | "acpi_battery_select() failed")); |
1302 | goto end; | 1302 | goto end; |
1303 | } | 1303 | } |
1304 | 1304 | ||
1305 | result = acpi_battery_get_present(battery); | 1305 | result = acpi_battery_get_present(battery); |
1306 | if (result) { | 1306 | if (result) { |
1307 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1307 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1308 | "acpi_battery_get_present() failed\n")); | 1308 | "acpi_battery_get_present() failed")); |
1309 | goto end; | 1309 | goto end; |
1310 | } | 1310 | } |
1311 | 1311 | ||
@@ -1314,8 +1314,8 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) | |||
1314 | if (is_present) { | 1314 | if (is_present) { |
1315 | result = acpi_battery_init(battery); | 1315 | result = acpi_battery_init(battery); |
1316 | if (result) { | 1316 | if (result) { |
1317 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1317 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1318 | "acpi_battery_init() failed\n")); | 1318 | "acpi_battery_init() failed")); |
1319 | goto end; | 1319 | goto end; |
1320 | } | 1320 | } |
1321 | battery->init_state = 1; | 1321 | battery->init_state = 1; |
@@ -1330,8 +1330,8 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) | |||
1330 | &acpi_battery_state_fops, | 1330 | &acpi_battery_state_fops, |
1331 | &acpi_battery_alarm_fops, battery); | 1331 | &acpi_battery_alarm_fops, battery); |
1332 | if (result) { | 1332 | if (result) { |
1333 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1333 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1334 | "acpi_sbs_generic_add_fs() failed\n")); | 1334 | "acpi_sbs_generic_add_fs() failed")); |
1335 | goto end; | 1335 | goto end; |
1336 | } | 1336 | } |
1337 | battery->alive = 1; | 1337 | battery->alive = 1; |
@@ -1355,8 +1355,8 @@ static int acpi_ac_add(struct acpi_sbs *sbs) | |||
1355 | 1355 | ||
1356 | result = acpi_ac_get_present(sbs); | 1356 | result = acpi_ac_get_present(sbs); |
1357 | if (result) { | 1357 | if (result) { |
1358 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1358 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1359 | "acpi_ac_get_present() failed\n")); | 1359 | "acpi_ac_get_present() failed")); |
1360 | goto end; | 1360 | goto end; |
1361 | } | 1361 | } |
1362 | 1362 | ||
@@ -1365,8 +1365,8 @@ static int acpi_ac_add(struct acpi_sbs *sbs) | |||
1365 | ACPI_AC_DIR_NAME, | 1365 | ACPI_AC_DIR_NAME, |
1366 | NULL, &acpi_ac_state_fops, NULL, sbs); | 1366 | NULL, &acpi_ac_state_fops, NULL, sbs); |
1367 | if (result) { | 1367 | if (result) { |
1368 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1368 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1369 | "acpi_sbs_generic_add_fs() failed\n")); | 1369 | "acpi_sbs_generic_add_fs() failed")); |
1370 | goto end; | 1370 | goto end; |
1371 | } | 1371 | } |
1372 | 1372 | ||
@@ -1409,8 +1409,8 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1409 | 1409 | ||
1410 | result = acpi_ac_get_present(sbs); | 1410 | result = acpi_ac_get_present(sbs); |
1411 | if (result) { | 1411 | if (result) { |
1412 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1412 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1413 | "acpi_ac_get_present() failed\n")); | 1413 | "acpi_ac_get_present() failed")); |
1414 | } | 1414 | } |
1415 | 1415 | ||
1416 | new_ac_present = acpi_ac_is_present(sbs); | 1416 | new_ac_present = acpi_ac_is_present(sbs); |
@@ -1433,8 +1433,8 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1433 | 1433 | ||
1434 | result = acpi_battery_select(battery); | 1434 | result = acpi_battery_select(battery); |
1435 | if (result) { | 1435 | if (result) { |
1436 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1436 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1437 | "acpi_battery_select() failed\n")); | 1437 | "acpi_battery_select() failed")); |
1438 | } | 1438 | } |
1439 | if (sbs->zombie) { | 1439 | if (sbs->zombie) { |
1440 | goto end; | 1440 | goto end; |
@@ -1442,8 +1442,8 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1442 | 1442 | ||
1443 | result = acpi_battery_get_present(battery); | 1443 | result = acpi_battery_get_present(battery); |
1444 | if (result) { | 1444 | if (result) { |
1445 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1445 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1446 | "acpi_battery_get_present() failed\n")); | 1446 | "acpi_battery_get_present() failed")); |
1447 | } | 1447 | } |
1448 | if (sbs->zombie) { | 1448 | if (sbs->zombie) { |
1449 | goto end; | 1449 | goto end; |
@@ -1466,9 +1466,9 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1466 | } | 1466 | } |
1467 | result = acpi_battery_init(battery); | 1467 | result = acpi_battery_init(battery); |
1468 | if (result) { | 1468 | if (result) { |
1469 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1469 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1470 | "acpi_battery_init() " | 1470 | "acpi_battery_init() " |
1471 | "failed\n")); | 1471 | "failed")); |
1472 | } | 1472 | } |
1473 | } | 1473 | } |
1474 | if (data_type == DATA_TYPE_INFO) { | 1474 | if (data_type == DATA_TYPE_INFO) { |
@@ -1481,9 +1481,9 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1481 | if (new_battery_present) { | 1481 | if (new_battery_present) { |
1482 | result = acpi_battery_get_alarm(battery); | 1482 | result = acpi_battery_get_alarm(battery); |
1483 | if (result) { | 1483 | if (result) { |
1484 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1484 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1485 | "acpi_battery_get_alarm() " | 1485 | "acpi_battery_get_alarm() " |
1486 | "failed\n")); | 1486 | "failed")); |
1487 | } | 1487 | } |
1488 | if (data_type == DATA_TYPE_ALARM) { | 1488 | if (data_type == DATA_TYPE_ALARM) { |
1489 | continue; | 1489 | continue; |
@@ -1491,9 +1491,9 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1491 | 1491 | ||
1492 | result = acpi_battery_get_state(battery); | 1492 | result = acpi_battery_get_state(battery); |
1493 | if (result) { | 1493 | if (result) { |
1494 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1494 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1495 | "acpi_battery_get_state() " | 1495 | "acpi_battery_get_state() " |
1496 | "failed\n")); | 1496 | "failed")); |
1497 | } | 1497 | } |
1498 | } | 1498 | } |
1499 | if (sbs->zombie) { | 1499 | if (sbs->zombie) { |
@@ -1511,9 +1511,9 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1511 | dir_name, | 1511 | dir_name, |
1512 | ACPI_BATTERY_CLASS); | 1512 | ACPI_BATTERY_CLASS); |
1513 | if (result) { | 1513 | if (result) { |
1514 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1514 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1515 | "acpi_sbs_generate_event() " | 1515 | "acpi_sbs_generate_event() " |
1516 | "failed\n")); | 1516 | "failed")); |
1517 | } | 1517 | } |
1518 | } | 1518 | } |
1519 | if (old_remaining_capacity != battery->state.remaining_capacity) { | 1519 | if (old_remaining_capacity != battery->state.remaining_capacity) { |
@@ -1524,8 +1524,8 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1524 | dir_name, | 1524 | dir_name, |
1525 | ACPI_BATTERY_CLASS); | 1525 | ACPI_BATTERY_CLASS); |
1526 | if (result) { | 1526 | if (result) { |
1527 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1527 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1528 | "acpi_sbs_generate_event() failed\n")); | 1528 | "acpi_sbs_generate_event() failed")); |
1529 | } | 1529 | } |
1530 | } | 1530 | } |
1531 | 1531 | ||
@@ -1544,8 +1544,8 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) | |||
1544 | ACPI_AC_DIR_NAME, | 1544 | ACPI_AC_DIR_NAME, |
1545 | ACPI_AC_CLASS); | 1545 | ACPI_AC_CLASS); |
1546 | if (result) { | 1546 | if (result) { |
1547 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1547 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1548 | "acpi_sbs_generate_event() failed\n")); | 1548 | "acpi_sbs_generate_event() failed")); |
1549 | } | 1549 | } |
1550 | } | 1550 | } |
1551 | 1551 | ||
@@ -1565,8 +1565,8 @@ static void acpi_sbs_update_queue(void *data) | |||
1565 | 1565 | ||
1566 | result = acpi_sbs_update_run(sbs, DATA_TYPE_COMMON); | 1566 | result = acpi_sbs_update_run(sbs, DATA_TYPE_COMMON); |
1567 | if (result) { | 1567 | if (result) { |
1568 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1568 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1569 | "acpi_sbs_update_run() failed\n")); | 1569 | "acpi_sbs_update_run() failed")); |
1570 | } | 1570 | } |
1571 | 1571 | ||
1572 | if (sbs->zombie) { | 1572 | if (sbs->zombie) { |
@@ -1598,13 +1598,13 @@ static int acpi_sbs_add(struct acpi_device *device) | |||
1598 | status = | 1598 | status = |
1599 | acpi_evaluate_integer(device->parent->handle, "_EC", NULL, &val); | 1599 | acpi_evaluate_integer(device->parent->handle, "_EC", NULL, &val); |
1600 | if (ACPI_FAILURE(status)) { | 1600 | if (ACPI_FAILURE(status)) { |
1601 | ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error obtaining _EC\n")); | 1601 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, "Error obtaining _EC")); |
1602 | return -EIO; | 1602 | return -EIO; |
1603 | } | 1603 | } |
1604 | 1604 | ||
1605 | sbs = kzalloc(sizeof(struct acpi_sbs), GFP_KERNEL); | 1605 | sbs = kzalloc(sizeof(struct acpi_sbs), GFP_KERNEL); |
1606 | if (!sbs) { | 1606 | if (!sbs) { |
1607 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "kmalloc() failed\n")); | 1607 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, "kmalloc() failed")); |
1608 | return -ENOMEM; | 1608 | return -ENOMEM; |
1609 | } | 1609 | } |
1610 | sbs->base = (val & 0xff00ull) >> 8; | 1610 | sbs->base = (val & 0xff00ull) >> 8; |
@@ -1620,13 +1620,13 @@ static int acpi_sbs_add(struct acpi_device *device) | |||
1620 | 1620 | ||
1621 | result = acpi_ac_add(sbs); | 1621 | result = acpi_ac_add(sbs); |
1622 | if (result) { | 1622 | if (result) { |
1623 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "acpi_ac_add() failed\n")); | 1623 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, "acpi_ac_add() failed")); |
1624 | goto end; | 1624 | goto end; |
1625 | } | 1625 | } |
1626 | result = acpi_evaluate_integer(device->handle, "_SBS", NULL, &sbs_obj); | 1626 | result = acpi_evaluate_integer(device->handle, "_SBS", NULL, &sbs_obj); |
1627 | if (ACPI_FAILURE(result)) { | 1627 | if (ACPI_FAILURE(result)) { |
1628 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1628 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1629 | "acpi_evaluate_integer() failed\n")); | 1629 | "acpi_evaluate_integer() failed")); |
1630 | result = -EIO; | 1630 | result = -EIO; |
1631 | goto end; | 1631 | goto end; |
1632 | } | 1632 | } |
@@ -1634,8 +1634,8 @@ static int acpi_sbs_add(struct acpi_device *device) | |||
1634 | if (sbs_obj > 0) { | 1634 | if (sbs_obj > 0) { |
1635 | result = acpi_sbsm_get_info(sbs); | 1635 | result = acpi_sbsm_get_info(sbs); |
1636 | if (result) { | 1636 | if (result) { |
1637 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1637 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1638 | "acpi_sbsm_get_info() failed\n")); | 1638 | "acpi_sbsm_get_info() failed")); |
1639 | goto end; | 1639 | goto end; |
1640 | } | 1640 | } |
1641 | sbs->sbsm_present = 1; | 1641 | sbs->sbsm_present = 1; |
@@ -1643,8 +1643,8 @@ static int acpi_sbs_add(struct acpi_device *device) | |||
1643 | if (sbs->sbsm_present == 0) { | 1643 | if (sbs->sbsm_present == 0) { |
1644 | result = acpi_battery_add(sbs, 0); | 1644 | result = acpi_battery_add(sbs, 0); |
1645 | if (result) { | 1645 | if (result) { |
1646 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1646 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1647 | "acpi_battery_add() failed\n")); | 1647 | "acpi_battery_add() failed")); |
1648 | goto end; | 1648 | goto end; |
1649 | } | 1649 | } |
1650 | } else { | 1650 | } else { |
@@ -1652,9 +1652,9 @@ static int acpi_sbs_add(struct acpi_device *device) | |||
1652 | if ((sbs->sbsm_batteries_supported & (1 << id))) { | 1652 | if ((sbs->sbsm_batteries_supported & (1 << id))) { |
1653 | result = acpi_battery_add(sbs, id); | 1653 | result = acpi_battery_add(sbs, id); |
1654 | if (result) { | 1654 | if (result) { |
1655 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1655 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1656 | "acpi_battery_add() " | 1656 | "acpi_battery_add() " |
1657 | "failed\n")); | 1657 | "failed")); |
1658 | goto end; | 1658 | goto end; |
1659 | } | 1659 | } |
1660 | } | 1660 | } |
@@ -1668,8 +1668,8 @@ static int acpi_sbs_add(struct acpi_device *device) | |||
1668 | status = acpi_os_execute(OSL_GPE_HANDLER, | 1668 | status = acpi_os_execute(OSL_GPE_HANDLER, |
1669 | acpi_sbs_update_queue, sbs); | 1669 | acpi_sbs_update_queue, sbs); |
1670 | if (status != AE_OK) { | 1670 | if (status != AE_OK) { |
1671 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1671 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1672 | "acpi_os_execute() failed\n")); | 1672 | "acpi_os_execute() failed")); |
1673 | } | 1673 | } |
1674 | } | 1674 | } |
1675 | sbs->update_time = update_time; | 1675 | sbs->update_time = update_time; |
@@ -1733,30 +1733,29 @@ static int __init acpi_sbs_init(void) | |||
1733 | if (capacity_mode != DEF_CAPACITY_UNIT | 1733 | if (capacity_mode != DEF_CAPACITY_UNIT |
1734 | && capacity_mode != MAH_CAPACITY_UNIT | 1734 | && capacity_mode != MAH_CAPACITY_UNIT |
1735 | && capacity_mode != MWH_CAPACITY_UNIT) { | 1735 | && capacity_mode != MWH_CAPACITY_UNIT) { |
1736 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "acpi_sbs_init: " | 1736 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, "acpi_sbs_init: " |
1737 | "invalid capacity_mode = %d\n", | 1737 | "invalid capacity_mode = %d", capacity_mode)); |
1738 | capacity_mode)); | ||
1739 | return -EINVAL; | 1738 | return -EINVAL; |
1740 | } | 1739 | } |
1741 | 1740 | ||
1742 | acpi_ac_dir = acpi_lock_ac_dir(); | 1741 | acpi_ac_dir = acpi_lock_ac_dir(); |
1743 | if (!acpi_ac_dir) { | 1742 | if (!acpi_ac_dir) { |
1744 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1743 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1745 | "acpi_lock_ac_dir() failed\n")); | 1744 | "acpi_lock_ac_dir() failed")); |
1746 | return -ENODEV; | 1745 | return -ENODEV; |
1747 | } | 1746 | } |
1748 | 1747 | ||
1749 | acpi_battery_dir = acpi_lock_battery_dir(); | 1748 | acpi_battery_dir = acpi_lock_battery_dir(); |
1750 | if (!acpi_battery_dir) { | 1749 | if (!acpi_battery_dir) { |
1751 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1750 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1752 | "acpi_lock_battery_dir() failed\n")); | 1751 | "acpi_lock_battery_dir() failed")); |
1753 | return -ENODEV; | 1752 | return -ENODEV; |
1754 | } | 1753 | } |
1755 | 1754 | ||
1756 | result = acpi_bus_register_driver(&acpi_sbs_driver); | 1755 | result = acpi_bus_register_driver(&acpi_sbs_driver); |
1757 | if (result < 0) { | 1756 | if (result < 0) { |
1758 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1757 | ACPI_EXCEPTION((AE_INFO, AE_ERROR, |
1759 | "acpi_bus_register_driver() failed\n")); | 1758 | "acpi_bus_register_driver() failed")); |
1760 | return -ENODEV; | 1759 | return -ENODEV; |
1761 | } | 1760 | } |
1762 | 1761 | ||