Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116728
b: refs/heads/master
c: aa42d7c
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and Jesse Barnes committed Oct 20, 2008
1 parent 57a59e2 commit cc30430
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9f82cb75096ae30658a72d473bf170bf4d3bb2e
refs/heads/master: aa42d7c6138afdc54f74e971456a0fbfec16b77b
13 changes: 13 additions & 0 deletions trunk/include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1119,5 +1119,18 @@ static inline void pci_mmcfg_early_init(void) { }
static inline void pci_mmcfg_late_init(void) { }
#endif

static inline void * 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 /* __KERNEL__ */
#endif /* LINUX_PCI_H */

0 comments on commit cc30430

Please sign in to comment.