diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2012-01-30 11:40:47 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-27 10:43:30 -0500 |
commit | 97a29d59fc222b36bac3ee3a8ae994f65bf7ffdf (patch) | |
tree | fdfe0aa6e408bbec38e33e49703a284eeaf7931d /include | |
parent | 500dd2370e77c9551ba298bdeeb91b02d8402199 (diff) |
[PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional
The problem in
commit fea80311a939a746533a6d7e7c3183729d6a3faf
Author: Randy Dunlap <rdunlap@xenotime.net>
Date: Sun Jul 24 11:39:14 2011 -0700
iomap: make IOPORT/PCI mapping functions conditional
is that if your architecture supplies pci_iomap/pci_iounmap, it expects
always to supply them. Adding empty body defitions in the !CONFIG_PCI
case, which is what this patch does, breaks the parisc compile because
the functions become doubly defined. It took us a while to spot this,
because we don't actually build !CONFIG_PCI very often (only if someone
is brave enough to test the snake/asp machines).
Since the note in the commit log says this is to fix a
CONFIG_GENERIC_IOMAP issue (which it does because CONFIG_GENERIC_IOMAP
supplies pci_iounmap only if CONFIG_PCI is set), there should actually
have been a condition upon this. This should make sure no other
architecture's !CONFIG_PCI compile breaks in the same way as parisc.
The fix had to be updated to take account of the GENERIC_PCI_IOMAP
separation.
Reported-by: Rolf Eike Beer <eike@sf-mail.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/iomap.h | 2 | ||||
-rw-r--r-- | include/asm-generic/pci_iomap.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h index 8a3d4fde2604..6afd7d6a9899 100644 --- a/include/asm-generic/iomap.h +++ b/include/asm-generic/iomap.h | |||
@@ -70,7 +70,7 @@ extern void ioport_unmap(void __iomem *); | |||
70 | /* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */ | 70 | /* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */ |
71 | struct pci_dev; | 71 | struct pci_dev; |
72 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | 72 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); |
73 | #else | 73 | #elif defined(CONFIG_GENERIC_IOMAP) |
74 | struct pci_dev; | 74 | struct pci_dev; |
75 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | 75 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) |
76 | { } | 76 | { } |
diff --git a/include/asm-generic/pci_iomap.h b/include/asm-generic/pci_iomap.h index e58fcf891370..ce37349860fe 100644 --- a/include/asm-generic/pci_iomap.h +++ b/include/asm-generic/pci_iomap.h | |||
@@ -25,7 +25,7 @@ extern void __iomem *__pci_ioport_map(struct pci_dev *dev, unsigned long port, | |||
25 | #define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr)) | 25 | #define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr)) |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #else | 28 | #elif defined(CONFIG_GENERIC_PCI_IOMAP) |
29 | static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | 29 | static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) |
30 | { | 30 | { |
31 | return NULL; | 31 | return NULL; |