Ignore:
Timestamp:
Jun 6, 2009, 4:22:27 AM (16 years ago)
Author:
Paul Smedley
Message:

Move functions out of config.h into appropriate linux header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/include/linux/pci.h

    r428 r441  
    295295typedef struct pci_dev;
    296296
    297 
     297#define PCI_D0     0
     298#define PCI_D1     1
     299#define PCI_D2     2
     300#define PCI_D3hot  3
     301#define PCI_D3cold 4
     302#define pci_choose_state(pci,state)     ((state) ? PCI_D3hot : PCI_D0)
    298303
    299304typedef struct device {
     
    678683
    679684#endif /* __KERNEL__ */
     685
     686static inline unsigned char snd_pci_revision(struct pci_dev *pci)
     687{
     688        unsigned char rev;
     689        pci_read_config_byte(pci, PCI_REVISION_ID, &rev);
     690        return rev;
     691}
     692
     693/* pci_intx() wrapper */
     694#define pci_intx(pci,x)
     695
     696/* MSI */
     697static inline int snd_pci_enable_msi(struct pci_dev *dev) { return -1; }
     698#undef pci_enable_msi
     699#define pci_enable_msi(dev) snd_pci_enable_msi(dev)
     700#undef pci_disable_msi
     701#define pci_disable_msi(dev)
     702#define pci_dev_present(x) snd_pci_dev_present(x)
     703extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
     704static inline void *pci_ioremap_bar(struct pci_dev *pdev, int bar)
     705{
     706        return __ioremap(pci_resource_start(pdev, bar),
     707                               pci_resource_len(pdev, bar),0x010);
     708}
     709
    680710#endif /* LINUX_PCI_H */
Note: See TracChangeset for help on using the changeset viewer.