linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / net / wireless / prism54 / islpci_hotplug.c
index 11b315b..b41d666 100644 (file)
@@ -18,7 +18,6 @@
  *
  */
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/delay.h>
@@ -81,7 +80,7 @@ MODULE_DEVICE_TABLE(pci, prism54_id_tbl);
 
 static int prism54_probe(struct pci_dev *, const struct pci_device_id *);
 static void prism54_remove(struct pci_dev *);
-static int prism54_suspend(struct pci_dev *, u32 state);
+static int prism54_suspend(struct pci_dev *, pm_message_t state);
 static int prism54_resume(struct pci_dev *);
 
 static struct pci_driver prism54_driver = {
@@ -107,9 +106,6 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        islpci_private *priv;
        int rvalue;
 
-       /* TRACE(DRV_NAME); */
-       
-       
        /* Enable the pci device */
        if (pci_enable_device(pdev)) {
                printk(KERN_ERR "%s: pci_enable_device() failed.\n", DRV_NAME);
@@ -166,7 +162,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        if (rvalue || !mem_addr) {
                printk(KERN_ERR "%s: PCI device memory region not configured; fix your BIOS or CardBus bridge/drivers\n",
                       DRV_NAME);
-               goto do_pci_disable_device;
+               goto do_pci_release_regions;
        }
 
        /* enable PCI bus-mastering */
@@ -264,16 +260,14 @@ prism54_remove(struct pci_dev *pdev)
 }
 
 int
-prism54_suspend(struct pci_dev *pdev, u32 state)
+prism54_suspend(struct pci_dev *pdev, pm_message_t state)
 {
        struct net_device *ndev = pci_get_drvdata(pdev);
        islpci_private *priv = ndev ? netdev_priv(ndev) : NULL;
        BUG_ON(!priv);
 
-       printk(KERN_NOTICE "%s: got suspend request (state %d)\n",
-              ndev->name, state);
 
-       pci_save_state(pdev, priv->pci_state);
+       pci_save_state(pdev);
 
        /* tell the device not to trigger interrupts for now... */
        isl38xx_disable_interrupts(priv->device_base);
@@ -295,9 +289,11 @@ prism54_resume(struct pci_dev *pdev)
        islpci_private *priv = ndev ? netdev_priv(ndev) : NULL;
        BUG_ON(!priv);
 
+       pci_enable_device(pdev);
+
        printk(KERN_NOTICE "%s: got resume request\n", ndev->name);
 
-       pci_restore_state(pdev, priv->pci_state);
+       pci_restore_state(pdev);
 
        /* alright let's go into the PREBOOT state */
        islpci_reset(priv, 1);