]> err.no Git - linux-2.6/blobdiff - include/asm-ppc/pci.h
[PATCH] i2c: Fix union i2c_smbus_data definition
[linux-2.6] / include / asm-ppc / pci.h
index a13d55870e62202b9045e80ac9e8b9ab7c2bb25a..9dd06cd40096aad23eec026983b41b7ed11664bd 100644 (file)
@@ -105,6 +105,23 @@ extern void
 pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
                        struct resource *res);
 
+extern void
+pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
+                       struct pci_bus_region *region);
+
+static inline struct resource *
+pcibios_select_root(struct pci_dev *pdev, struct resource *res)
+{
+       struct resource *root = NULL;
+
+       if (res->flags & IORESOURCE_IO)
+               root = &ioport_resource;
+       if (res->flags & IORESOURCE_MEM)
+               root = &iomem_resource;
+
+       return root;
+}
+
 extern void pcibios_add_platform_entries(struct pci_dev *dev);
 
 struct file;