Free irq in ->suspend and request irq in ->resume to be compliant with the latest PM request (Documentation/power/pci.txt). Signed-off-by: Zhu Yi -- diff -urp ipw2100-1.1.2/ipw2100.c ipw2100-1.1.2-pci_link/ipw2100.c --- ipw2100-1.1.2/ipw2100.c 2005-07-14 02:59:37.000000000 +0800 +++ ipw2100-1.1.2-pci_link/ipw2100.c 2005-08-09 15:58:41.000000000 +0800 @@ -6447,6 +6447,7 @@ static int ipw2100_suspend(struct pci_de /* Take down the device; powers it off, etc. */ ipw2100_down(priv); } + free_irq(pci_dev->irq, dev); /* Remove the PRESENT state of the device */ netif_device_detach(dev); @@ -6473,6 +6474,7 @@ static int ipw2100_resume(struct pci_dev struct ipw2100_priv *priv = pci_get_drvdata(pci_dev); struct net_device *dev = priv->net_dev; u32 val; + int err = 0; if (IPW2100_PM_DISABLED) return 0; @@ -6488,6 +6490,7 @@ static int ipw2100_resume(struct pci_dev pci_set_power_state(pci_dev, PCI_D0); #endif pci_enable_device(pci_dev); + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) pci_restore_state(pci_dev,priv->pm_state); #else @@ -6504,6 +6507,14 @@ static int ipw2100_resume(struct pci_dev if ((val & 0x0000ff00) != 0) pci_write_config_dword(pci_dev, 0x40, val & 0xffff00ff); + err = request_irq(pci_dev->irq, + ipw2100_interrupt, SA_SHIRQ, dev->name, priv); + if (err) { + printk(KERN_WARNING DRV_NAME + "Error calling request_irq: %d.\n", pci_dev->irq); + goto exit; + } + /* Set the device back into the PRESENT state; this will also wake * the queue of needed */ netif_device_attach(dev); @@ -6512,9 +6523,9 @@ static int ipw2100_resume(struct pci_dev if (!(priv->status & STATUS_RF_KILL_SW)) ipw2100_up(priv, 0); +exit: up(&priv->action_sem); - - return 0; + return err; } #endif