[PATCH RFC 07/15] pci: Add pci_probe() and pci_shutdown()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cc: Thomas Huth <thuth@xxxxxxxxxx>
Cc: Andrew Jones <drjones@xxxxxxxxxx>
Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx>
---
 lib/asm-generic/pci.h | 15 ++++++++++++++-
 lib/pci.c             |  1 -
 lib/pci.h             |  2 ++
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/lib/asm-generic/pci.h b/lib/asm-generic/pci.h
index 3fa0b2ab1fe6..175b0497ed82 100644
--- a/lib/asm-generic/pci.h
+++ b/lib/asm-generic/pci.h
@@ -1,4 +1,17 @@
 #ifndef _ASM_GENERIC_PCI_H_
 #define _ASM_GENERIC_PCI_H_
-#error need architecture specific asm/pci.h
+
+#ifndef pci_probe
+static inline bool pci_probe(void)
+{
+	return true;
+}
+#endif
+
+#ifndef pci_shutdown
+static inline void pci_shutdown(void)
+{
+}
+#endif
+
 #endif
diff --git a/lib/pci.c b/lib/pci.c
index 4f1d0fbdce39..88c7d2d06fc2 100644
--- a/lib/pci.c
+++ b/lib/pci.c
@@ -5,7 +5,6 @@
  */
 #include <linux/pci_regs.h>
 #include "pci.h"
-#include "asm/pci.h"
 
 /* Scan bus look for a specific device. Only bus 0 scanned for now. */
 pcidevaddr_t pci_find_dev(uint16_t vendor_id, uint16_t device_id)
diff --git a/lib/pci.h b/lib/pci.h
index 88dc47c1f48d..90bf62bf3b6d 100644
--- a/lib/pci.h
+++ b/lib/pci.h
@@ -39,4 +39,6 @@ struct pci_test_dev_hdr {
 	uint8_t  name[];
 };
 
+#include "asm/pci.h"
+
 #endif /* PCI_H */
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux