lkml.org 
[lkml]   [2006]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][UPDATE] PCI: Add pci_assign_resource_fixed -- allow fixed address assignments
Kumar Gala <galak@kernel.crashing.org> 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.

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

\
 
 \ /
  Last update: 2006-04-28 06:49    [W:0.055 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site