diff options
Diffstat (limited to 'drivers/acpi/pci_link.c')
-rw-r--r-- | drivers/acpi/pci_link.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 6a29610edc11..d9a9b86ecb28 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -776,15 +776,25 @@ end: | |||
776 | } | 776 | } |
777 | 777 | ||
778 | static int | 778 | static int |
779 | irqrouter_suspend( | 779 | acpi_pci_link_resume( |
780 | struct sys_device *dev, | 780 | struct acpi_pci_link *link) |
781 | u32 state) | 781 | { |
782 | ACPI_FUNCTION_TRACE("acpi_pci_link_resume"); | ||
783 | |||
784 | if (link->refcnt && link->irq.active && link->irq.initialized) | ||
785 | return_VALUE(acpi_pci_link_set(link, link->irq.active)); | ||
786 | else | ||
787 | return_VALUE(0); | ||
788 | } | ||
789 | |||
790 | static int | ||
791 | irqrouter_resume( | ||
792 | struct sys_device *dev) | ||
782 | { | 793 | { |
783 | struct list_head *node = NULL; | 794 | struct list_head *node = NULL; |
784 | struct acpi_pci_link *link = NULL; | 795 | struct acpi_pci_link *link = NULL; |
785 | int ret = 0; | ||
786 | 796 | ||
787 | ACPI_FUNCTION_TRACE("irqrouter_suspend"); | 797 | ACPI_FUNCTION_TRACE("irqrouter_resume"); |
788 | 798 | ||
789 | list_for_each(node, &acpi_link.entries) { | 799 | list_for_each(node, &acpi_link.entries) { |
790 | link = list_entry(node, struct acpi_pci_link, node); | 800 | link = list_entry(node, struct acpi_pci_link, node); |
@@ -793,21 +803,9 @@ irqrouter_suspend( | |||
793 | "Invalid link context\n")); | 803 | "Invalid link context\n")); |
794 | continue; | 804 | continue; |
795 | } | 805 | } |
796 | if (link->irq.initialized && link->refcnt != 0 | 806 | acpi_pci_link_resume(link); |
797 | /* We ignore legacy IDE device irq */ | ||
798 | && link->irq.active != 14 && link->irq.active !=15) { | ||
799 | printk(KERN_WARNING PREFIX | ||
800 | "%d drivers with interrupt %d neglected to call" | ||
801 | " pci_disable_device at .suspend\n", | ||
802 | link->refcnt, | ||
803 | link->irq.active); | ||
804 | printk(KERN_WARNING PREFIX | ||
805 | "Fix the driver, or rmmod before suspend\n"); | ||
806 | link->refcnt = 0; | ||
807 | ret = -EINVAL; | ||
808 | } | ||
809 | } | 807 | } |
810 | return_VALUE(ret); | 808 | return_VALUE(0); |
811 | } | 809 | } |
812 | 810 | ||
813 | 811 | ||
@@ -922,7 +920,7 @@ __setup("acpi_irq_balance", acpi_irq_balance_set); | |||
922 | /* FIXME: we will remove this interface after all drivers call pci_disable_device */ | 920 | /* FIXME: we will remove this interface after all drivers call pci_disable_device */ |
923 | static struct sysdev_class irqrouter_sysdev_class = { | 921 | static struct sysdev_class irqrouter_sysdev_class = { |
924 | set_kset_name("irqrouter"), | 922 | set_kset_name("irqrouter"), |
925 | .suspend = irqrouter_suspend, | 923 | .resume = irqrouter_resume, |
926 | }; | 924 | }; |
927 | 925 | ||
928 | 926 | ||