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

[Xen-devel] [PATCH 18/31] Coalesce xen/pcifront.h in drivers/xen/pcifront/pcifront.h



Moved all of the function declerations in the driver's pcifront.h.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 drivers/xen/pcifront/pcifront.h |   54 ++++++++++++++++++++++++++++-
 include/xen/pcifront.h          |   72 ---------------------------------------
 2 files changed, 53 insertions(+), 73 deletions(-)
 delete mode 100644 include/xen/pcifront.h

diff --git a/drivers/xen/pcifront/pcifront.h b/drivers/xen/pcifront/pcifront.h
index 8e24fbe..3c6a799 100644
--- a/drivers/xen/pcifront/pcifront.h
+++ b/drivers/xen/pcifront/pcifront.h
@@ -11,7 +11,6 @@
 #include <xen/xenbus.h>
 #include <xen/interface/io/pciif.h>
 #include <linux/interrupt.h>
-#include <xen/pcifront.h>
 #include <asm/atomic.h>
 #include <linux/workqueue.h>
 
@@ -41,6 +40,59 @@ struct pcifront_device {
 
 };
 
+#ifndef __ia64__
+
+struct pcifront_sd {
+       int domain;
+       struct pcifront_device *pdev;
+};
+
+static inline struct pcifront_device *
+pcifront_get_pdev(struct pcifront_sd *sd)
+{
+       return sd->pdev;
+}
+
+static inline void pcifront_init_sd(struct pcifront_sd *sd,
+                                   unsigned int domain, unsigned int bus,
+                                   struct pcifront_device *pdev)
+{
+       sd->domain = domain;
+       sd->pdev = pdev;
+}
+
+
+static inline void pcifront_setup_root_resources(struct pci_bus *bus,
+                                                struct pcifront_sd *sd)
+{
+}
+
+#else /* __ia64__ */
+
+#include <linux/acpi.h>
+#include <asm/pci.h>
+#define pcifront_sd pci_controller
+
+extern void xen_add_resource(struct pci_controller *, unsigned int,
+                            unsigned int, struct acpi_resource *);
+extern void xen_pcibios_setup_root_windows(struct pci_bus *,
+                                          struct pci_controller *);
+
+static inline struct pcifront_device *
+pcifront_get_pdev(struct pcifront_sd *sd)
+{
+       return (struct pcifront_device *)sd->platform_data;
+}
+
+static inline void pcifront_setup_root_resources(struct pci_bus *bus,
+                                                struct pcifront_sd *sd)
+{
+       xen_pcibios_setup_root_windows(bus, sd);
+}
+
+#endif /* __ia64__ */
+
+extern struct rw_semaphore pci_bus_sem;
 
 int pcifront_scan_root(struct pcifront_device *pdev,
                       unsigned int domain, unsigned int bus);
diff --git a/include/xen/pcifront.h b/include/xen/pcifront.h
deleted file mode 100644
index bda9bd6..0000000
--- a/include/xen/pcifront.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * PCI Frontend - arch-dependendent declarations
- *
- *   Author: Ryan Wilson <hap9@xxxxxxxxxxxxxx>
- */
-#ifndef __XEN_ASM_PCIFRONT_H__
-#define __XEN_ASM_PCIFRONT_H__
-
-#include <linux/spinlock.h>
-
-#ifdef __KERNEL__
-
-#ifndef __ia64__
-
-struct pcifront_device;
-struct pci_bus;
-
-struct pcifront_sd {
-       int domain;
-       struct pcifront_device *pdev;
-};
-
-static inline struct pcifront_device *
-pcifront_get_pdev(struct pcifront_sd *sd)
-{
-       return sd->pdev;
-}
-
-static inline void pcifront_init_sd(struct pcifront_sd *sd,
-                                   unsigned int domain, unsigned int bus,
-                                   struct pcifront_device *pdev)
-{
-       sd->domain = domain;
-       sd->pdev = pdev;
-}
-
-
-static inline void pcifront_setup_root_resources(struct pci_bus *bus,
-                                                struct pcifront_sd *sd)
-{
-}
-
-#else /* __ia64__ */
-
-#include <linux/acpi.h>
-#include <asm/pci.h>
-#define pcifront_sd pci_controller
-
-extern void xen_add_resource(struct pci_controller *, unsigned int,
-                            unsigned int, struct acpi_resource *);
-extern void xen_pcibios_setup_root_windows(struct pci_bus *,
-                                          struct pci_controller *);
-
-static inline struct pcifront_device *
-pcifront_get_pdev(struct pcifront_sd *sd)
-{
-       return (struct pcifront_device *)sd->platform_data;
-}
-
-static inline void pcifront_setup_root_resources(struct pci_bus *bus,
-                                                struct pcifront_sd *sd)
-{
-       xen_pcibios_setup_root_windows(bus, sd);
-}
-
-#endif /* __ia64__ */
-
-extern struct rw_semaphore pci_bus_sem;
-
-#endif /* __KERNEL__ */
-
-#endif /* __XEN_ASM_PCIFRONT_H__ */
-- 
1.6.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.