WIP FPC-III support
[linux/fpc-iii.git] / drivers / net / wireless / intersil / orinoco / orinoco_pci.h
blobd49d940864b4107704efc47832443489f546db9c
1 /* orinoco_pci.h
3 * Common code for all Orinoco drivers for PCI devices, including
4 * both native PCI and PCMCIA-to-PCI bridges.
6 * Copyright (C) 2005, Pavel Roskin.
7 * See main.c for license.
8 */
10 #ifndef _ORINOCO_PCI_H
11 #define _ORINOCO_PCI_H
13 #include <linux/netdevice.h>
15 /* Driver specific data */
16 struct orinoco_pci_card {
17 void __iomem *bridge_io;
18 void __iomem *attr_io;
21 static int __maybe_unused orinoco_pci_suspend(struct device *dev_d)
23 struct pci_dev *pdev = to_pci_dev(dev_d);
24 struct orinoco_private *priv = pci_get_drvdata(pdev);
26 orinoco_down(priv);
27 free_irq(pdev->irq, priv);
29 return 0;
32 static int __maybe_unused orinoco_pci_resume(struct device *dev_d)
34 struct pci_dev *pdev = to_pci_dev(dev_d);
35 struct orinoco_private *priv = pci_get_drvdata(pdev);
36 struct net_device *dev = priv->ndev;
37 int err;
39 err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
40 dev->name, priv);
41 if (err) {
42 printk(KERN_ERR "%s: cannot re-allocate IRQ on resume\n",
43 dev->name);
44 return -EBUSY;
47 return orinoco_up(priv);
50 static SIMPLE_DEV_PM_OPS(orinoco_pci_pm_ops,
51 orinoco_pci_suspend,
52 orinoco_pci_resume);
54 #endif /* _ORINOCO_PCI_H */