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.
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
);
27 free_irq(pdev
->irq
, priv
);
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
;
39 err
= request_irq(pdev
->irq
, orinoco_interrupt
, IRQF_SHARED
,
42 printk(KERN_ERR
"%s: cannot re-allocate IRQ on resume\n",
47 return orinoco_up(priv
);
50 static SIMPLE_DEV_PM_OPS(orinoco_pci_pm_ops
,
54 #endif /* _ORINOCO_PCI_H */