diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:52:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:52:36 -0400 |
commit | 37224470c8c6d90a4062e76a08d4dc1fcf91fc89 (patch) | |
tree | 627f537177bf8e951c12bec04c4a85f0125f5ece /drivers/acpi/pci_link.c | |
parent | e83319510b04dd51a60da8a0b4ccf8b92b3ab1ad (diff) | |
parent | ae6c859b7dcd708efadf1c76279c33db213e3506 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (65 commits)
ACPI: suppress power button event on S3 resume
ACPI: resolve merge conflict between sem2mutex and processor_perflib.c
ACPI: use for_each_possible_cpu() instead of for_each_cpu()
ACPI: delete newly added debugging macros in processor_perflib.c
ACPI: UP build fix for bugzilla-5737
Enable P-state software coordination via _PDC
P-state software coordination for speedstep-centrino
P-state software coordination for acpi-cpufreq
P-state software coordination for ACPI core
ACPI: create acpi_thermal_resume()
ACPI: create acpi_fan_suspend()/acpi_fan_resume()
ACPI: pass pm_message_t from acpi_device_suspend() to root_suspend()
ACPI: create acpi_device_suspend()/acpi_device_resume()
ACPI: replace spin_lock_irq with mutex for ec poll mode
ACPI: Allow a WAN module enable/disable on a Thinkpad X60.
sem2mutex: acpi, acpi_link_lock
ACPI: delete unused acpi_bus_drivers_lock
sem2mutex: drivers/acpi/processor_perflib.c
ACPI add ia64 exports to build acpi_memhotplug as a module
ACPI: asus_acpi_init(): propagate correct return value
...
Manual resolve of conflicts in:
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
include/acpi/processor.h
Diffstat (limited to 'drivers/acpi/pci_link.c')
-rw-r--r-- | drivers/acpi/pci_link.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 8920e8c6e246..228bdb626502 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
39 | #include <linux/pm.h> | 39 | #include <linux/pm.h> |
40 | #include <linux/pci.h> | 40 | #include <linux/pci.h> |
41 | #include <linux/mutex.h> | ||
41 | 42 | ||
42 | #include <acpi/acpi_bus.h> | 43 | #include <acpi/acpi_bus.h> |
43 | #include <acpi/acpi_drivers.h> | 44 | #include <acpi/acpi_drivers.h> |
@@ -91,7 +92,7 @@ static struct { | |||
91 | int count; | 92 | int count; |
92 | struct list_head entries; | 93 | struct list_head entries; |
93 | } acpi_link; | 94 | } acpi_link; |
94 | DECLARE_MUTEX(acpi_link_lock); | 95 | DEFINE_MUTEX(acpi_link_lock); |
95 | 96 | ||
96 | /* -------------------------------------------------------------------------- | 97 | /* -------------------------------------------------------------------------- |
97 | PCI Link Device Management | 98 | PCI Link Device Management |
@@ -641,19 +642,19 @@ acpi_pci_link_allocate_irq(acpi_handle handle, | |||
641 | return_VALUE(-1); | 642 | return_VALUE(-1); |
642 | } | 643 | } |
643 | 644 | ||
644 | down(&acpi_link_lock); | 645 | mutex_lock(&acpi_link_lock); |
645 | if (acpi_pci_link_allocate(link)) { | 646 | if (acpi_pci_link_allocate(link)) { |
646 | up(&acpi_link_lock); | 647 | mutex_unlock(&acpi_link_lock); |
647 | return_VALUE(-1); | 648 | return_VALUE(-1); |
648 | } | 649 | } |
649 | 650 | ||
650 | if (!link->irq.active) { | 651 | if (!link->irq.active) { |
651 | up(&acpi_link_lock); | 652 | mutex_unlock(&acpi_link_lock); |
652 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link active IRQ is 0!\n")); | 653 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link active IRQ is 0!\n")); |
653 | return_VALUE(-1); | 654 | return_VALUE(-1); |
654 | } | 655 | } |
655 | link->refcnt++; | 656 | link->refcnt++; |
656 | up(&acpi_link_lock); | 657 | mutex_unlock(&acpi_link_lock); |
657 | 658 | ||
658 | if (triggering) | 659 | if (triggering) |
659 | *triggering = link->irq.triggering; | 660 | *triggering = link->irq.triggering; |
@@ -691,9 +692,9 @@ int acpi_pci_link_free_irq(acpi_handle handle) | |||
691 | return_VALUE(-1); | 692 | return_VALUE(-1); |
692 | } | 693 | } |
693 | 694 | ||
694 | down(&acpi_link_lock); | 695 | mutex_lock(&acpi_link_lock); |
695 | if (!link->irq.initialized) { | 696 | if (!link->irq.initialized) { |
696 | up(&acpi_link_lock); | 697 | mutex_unlock(&acpi_link_lock); |
697 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link isn't initialized\n")); | 698 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link isn't initialized\n")); |
698 | return_VALUE(-1); | 699 | return_VALUE(-1); |
699 | } | 700 | } |
@@ -716,7 +717,7 @@ int acpi_pci_link_free_irq(acpi_handle handle) | |||
716 | if (link->refcnt == 0) { | 717 | if (link->refcnt == 0) { |
717 | acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); | 718 | acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); |
718 | } | 719 | } |
719 | up(&acpi_link_lock); | 720 | mutex_unlock(&acpi_link_lock); |
720 | return_VALUE(link->irq.active); | 721 | return_VALUE(link->irq.active); |
721 | } | 722 | } |
722 | 723 | ||
@@ -747,7 +748,7 @@ static int acpi_pci_link_add(struct acpi_device *device) | |||
747 | strcpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS); | 748 | strcpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS); |
748 | acpi_driver_data(device) = link; | 749 | acpi_driver_data(device) = link; |
749 | 750 | ||
750 | down(&acpi_link_lock); | 751 | mutex_lock(&acpi_link_lock); |
751 | result = acpi_pci_link_get_possible(link); | 752 | result = acpi_pci_link_get_possible(link); |
752 | if (result) | 753 | if (result) |
753 | goto end; | 754 | goto end; |
@@ -782,7 +783,7 @@ static int acpi_pci_link_add(struct acpi_device *device) | |||
782 | end: | 783 | end: |
783 | /* disable all links -- to be activated on use */ | 784 | /* disable all links -- to be activated on use */ |
784 | acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); | 785 | acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); |
785 | up(&acpi_link_lock); | 786 | mutex_unlock(&acpi_link_lock); |
786 | 787 | ||
787 | if (result) | 788 | if (result) |
788 | kfree(link); | 789 | kfree(link); |
@@ -840,9 +841,9 @@ static int acpi_pci_link_remove(struct acpi_device *device, int type) | |||
840 | 841 | ||
841 | link = (struct acpi_pci_link *)acpi_driver_data(device); | 842 | link = (struct acpi_pci_link *)acpi_driver_data(device); |
842 | 843 | ||
843 | down(&acpi_link_lock); | 844 | mutex_lock(&acpi_link_lock); |
844 | list_del(&link->node); | 845 | list_del(&link->node); |
845 | up(&acpi_link_lock); | 846 | mutex_unlock(&acpi_link_lock); |
846 | 847 | ||
847 | kfree(link); | 848 | kfree(link); |
848 | 849 | ||