summaryrefslogtreecommitdiffstats
path: root/include/of_pci.h
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2014-07-30 10:39:39 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-31 07:29:22 +0200
commit846da3d7df1c0873d437bc7ee1c3e94f5dac6dcf (patch)
tree84d11c9d9251b1adbf318ebe16a7e726ca401660 /include/of_pci.h
parent916ca9472fb322f79e9814aa9fc04e504ab0e792 (diff)
downloadbarebox-846da3d7df1c0873d437bc7ee1c3e94f5dac6dcf.tar.gz
barebox-846da3d7df1c0873d437bc7ee1c3e94f5dac6dcf.tar.xz
of: pci: import of_pci_get_devfn()
Marvell MVEBU PCIe driver requires of_pcie_get_devfn(), import it from Linux. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/of_pci.h')
-rw-r--r--include/of_pci.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/of_pci.h b/include/of_pci.h
new file mode 100644
index 0000000000..c95cb0135a
--- /dev/null
+++ b/include/of_pci.h
@@ -0,0 +1,17 @@
+#ifndef __OF_PCI_H
+#define __OF_PCI_H
+
+#include <linux/pci.h>
+
+#ifdef CONFIG_OF_PCI
+int of_pci_get_devfn(struct device_node *np);
+
+#else
+static inline int of_pci_get_devfn(struct device_node *np)
+{
+ return -EINVAL;
+}
+
+#endif
+
+#endif