Re: [PATCH][UPDATE] PCI: Add pci_assign_resource_fixed -- allow fixed address assignments

From: Kumar Gala
Date: Fri Apr 28 2006 - 10:51:56 EST



On Apr 27, 2006, at 11:43 PM, Andrew Morton wrote:

Kumar Gala <galak@xxxxxxxxxxxxxxxxxxx> wrote:

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 2329f94..955a96e 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -947,6 +947,9 @@ EXPORT_SYMBOL_GPL(pci_intx);
EXPORT_SYMBOL(pci_set_dma_mask);
EXPORT_SYMBOL(pci_set_consistent_dma_mask);
EXPORT_SYMBOL(pci_assign_resource);
+#ifdef CONFIG_EMBEDDED
+EXPORT_SYMBOL(pci_assign_resource_fixed);
+#endif

This is a good argument for putting the export at the definition site ;)

--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -496,6 +496,9 @@ int pci_set_dma_mask(struct pci_dev *dev
int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
int pci_assign_resource(struct pci_dev *dev, int i);
+#ifdef CONFIG_EMBEDDED
+int pci_assign_resource_fixed(struct pci_dev *dev, int i);
+#endif

Debatable - if we omit the ifdefs, it fails at link time or depmod time.
The ifdefs will make it warn (but not fail) at compile-time. Given that
the warning is non-fatal, the ifdefs don't add much value and are best
omitted.

I'll make these changes. I didn't care for the ifdef in the header but was following the example already in it for isa_bridge.

- k

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/