Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127375
b: refs/heads/master
c: 1684f5d
h: refs/heads/master
i:
  127373: 5380a6a
  127371: a94e576
  127367: 57ab6d9
  127359: 3da4efa
v: v3
  • Loading branch information
Andrew Morton authored and Jesse Barnes committed Jan 7, 2009
1 parent c5bd312 commit 9d58c2e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bebd590ca27e80ffe3129ab4f0a3124f0a340f43
refs/heads/master: 1684f5ddd4c0c754f52c78eaa2c5c69ad09fb18c
16 changes: 16 additions & 0 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ unsigned char pci_bus_max_busnr(struct pci_bus* bus)
}
EXPORT_SYMBOL_GPL(pci_bus_max_busnr);

#ifdef CONFIG_HAS_IOMEM
void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
{
/*
* Make sure the BAR is actually a memory resource, not an IO resource
*/
if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
WARN_ON(1);
return NULL;
}
return ioremap_nocache(pci_resource_start(pdev, bar),
pci_resource_len(pdev, bar));
}
EXPORT_SYMBOL_GPL(pci_ioremap_bar);
#endif

#if 0
/**
* pci_max_busnr - returns maximum PCI bus number
Expand Down
15 changes: 1 addition & 14 deletions trunk/include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1160,20 +1160,7 @@ static inline void pci_mmcfg_late_init(void) { }

int pci_ext_cfg_avail(struct pci_dev *dev);

#ifdef CONFIG_HAS_IOMEM
static inline void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
{
/*
* Make sure the BAR is actually a memory resource, not an IO resource
*/
if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
WARN_ON(1);
return NULL;
}
return ioremap_nocache(pci_resource_start(pdev, bar),
pci_resource_len(pdev, bar));
}
#endif
void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);

#endif /* __KERNEL__ */
#endif /* LINUX_PCI_H */

0 comments on commit 9d58c2e

Please sign in to comment.