Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5556
b: refs/heads/master
c: 697a2d6
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Aug 1, 2005
1 parent 14fb7a4 commit 0363c39
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ceb5db9757aaeadcf8fbbf97d76bd42aa4df0d6
refs/heads/master: 697a2d63a3844caaa2b6565ab7f3d69086af94d4
38 changes: 18 additions & 20 deletions trunk/drivers/acpi/pci_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,15 +776,25 @@ acpi_pci_link_add (
}

static int
irqrouter_suspend(
struct sys_device *dev,
u32 state)
acpi_pci_link_resume(
struct acpi_pci_link *link)
{
ACPI_FUNCTION_TRACE("acpi_pci_link_resume");

if (link->refcnt && link->irq.active && link->irq.initialized)
return_VALUE(acpi_pci_link_set(link, link->irq.active));
else
return_VALUE(0);
}

static int
irqrouter_resume(
struct sys_device *dev)
{
struct list_head *node = NULL;
struct acpi_pci_link *link = NULL;
int ret = 0;

ACPI_FUNCTION_TRACE("irqrouter_suspend");
ACPI_FUNCTION_TRACE("irqrouter_resume");

list_for_each(node, &acpi_link.entries) {
link = list_entry(node, struct acpi_pci_link, node);
Expand All @@ -793,21 +803,9 @@ irqrouter_suspend(
"Invalid link context\n"));
continue;
}
if (link->irq.initialized && link->refcnt != 0
/* We ignore legacy IDE device irq */
&& link->irq.active != 14 && link->irq.active !=15) {
printk(KERN_WARNING PREFIX
"%d drivers with interrupt %d neglected to call"
" pci_disable_device at .suspend\n",
link->refcnt,
link->irq.active);
printk(KERN_WARNING PREFIX
"Fix the driver, or rmmod before suspend\n");
link->refcnt = 0;
ret = -EINVAL;
}
acpi_pci_link_resume(link);
}
return_VALUE(ret);
return_VALUE(0);
}


Expand Down Expand Up @@ -922,7 +920,7 @@ __setup("acpi_irq_balance", acpi_irq_balance_set);
/* FIXME: we will remove this interface after all drivers call pci_disable_device */
static struct sysdev_class irqrouter_sysdev_class = {
set_kset_name("irqrouter"),
.suspend = irqrouter_suspend,
.resume = irqrouter_resume,
};


Expand Down

0 comments on commit 0363c39

Please sign in to comment.