diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2011-06-10 10:30:21 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-07-22 11:26:06 -0400 |
commit | d5341942d784134f2997b3ff82cd63cf71d1f932 (patch) | |
tree | 355ad81a15d031bbfe7dd94ee6696d8889c926d0 /arch/arm/mach-ixp4xx | |
parent | 05d3ac267a9d10af6ca370afe21802333aad1d5c (diff) |
PCI: Make the struct pci_dev * argument of pci_fixup_irqs const.
Aside of the usual motivation for constification, this function has a
history of being abused a hook for interrupt and other fixups so I turned
this function const ages ago in the MIPS code but it should be done
treewide.
Due to function pointer passing in varous places a few other functions
had to be constified as well.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
To: Anton Vorontsov <avorontsov@mvista.com>
To: Chris Metcalf <cmetcalf@tilera.com>
To: Colin Cross <ccross@android.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
To: Eric Miao <eric.y.miao@gmail.com>
To: Erik Gilling <konkers@android.com>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
To: "H. Peter Anvin" <hpa@zytor.com>
To: Imre Kaloz <kaloz@openwrt.org>
To: Ingo Molnar <mingo@redhat.com>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Krzysztof Halasa <khc@pm.waw.pl>
To: Lennert Buytenhek <kernel@wantstofly.org>
To: Matt Turner <mattst88@gmail.com>
To: Nicolas Pitre <nico@fluxnic.net>
To: Olof Johansson <olof@lixom.net>
Acked-by: Paul Mundt <lethal@linux-sh.org>
To: Richard Henderson <rth@twiddle.net>
To: Russell King <linux@arm.linux.org.uk>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-alpha@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-pci@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: x86@kernel.org
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r-- | arch/arm/mach-ixp4xx/avila-pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/coyote-pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/dsmg600-pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/fsg-pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/gateway7001-pci.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/goramo_mlr.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/gtwx5715-pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/ixdp425-pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/ixdpg425-pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/nas100d-pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/nslu2-pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/vulcan-pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/wg302v2-pci.c | 2 |
13 files changed, 14 insertions, 13 deletions
diff --git a/arch/arm/mach-ixp4xx/avila-pci.c b/arch/arm/mach-ixp4xx/avila-pci.c index 162043ff29ff..8fea0a3c5246 100644 --- a/arch/arm/mach-ixp4xx/avila-pci.c +++ b/arch/arm/mach-ixp4xx/avila-pci.c | |||
@@ -46,7 +46,7 @@ void __init avila_pci_preinit(void) | |||
46 | ixp4xx_pci_preinit(); | 46 | ixp4xx_pci_preinit(); |
47 | } | 47 | } |
48 | 48 | ||
49 | static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 49 | static int __init avila_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
50 | { | 50 | { |
51 | static int pci_irq_table[IRQ_LINES] = { | 51 | static int pci_irq_table[IRQ_LINES] = { |
52 | IXP4XX_GPIO_IRQ(INTA), | 52 | IXP4XX_GPIO_IRQ(INTA), |
diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c index 37fda7d6e83d..71f5c9c60fc3 100644 --- a/arch/arm/mach-ixp4xx/coyote-pci.c +++ b/arch/arm/mach-ixp4xx/coyote-pci.c | |||
@@ -37,7 +37,7 @@ void __init coyote_pci_preinit(void) | |||
37 | ixp4xx_pci_preinit(); | 37 | ixp4xx_pci_preinit(); |
38 | } | 38 | } |
39 | 39 | ||
40 | static int __init coyote_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 40 | static int __init coyote_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
41 | { | 41 | { |
42 | if (slot == SLOT0_DEVID) | 42 | if (slot == SLOT0_DEVID) |
43 | return IXP4XX_GPIO_IRQ(SLOT0_INTA); | 43 | return IXP4XX_GPIO_IRQ(SLOT0_INTA); |
diff --git a/arch/arm/mach-ixp4xx/dsmg600-pci.c b/arch/arm/mach-ixp4xx/dsmg600-pci.c index c7612010b3fc..0532510b5e8c 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-pci.c +++ b/arch/arm/mach-ixp4xx/dsmg600-pci.c | |||
@@ -44,7 +44,7 @@ void __init dsmg600_pci_preinit(void) | |||
44 | ixp4xx_pci_preinit(); | 44 | ixp4xx_pci_preinit(); |
45 | } | 45 | } |
46 | 46 | ||
47 | static int __init dsmg600_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 47 | static int __init dsmg600_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
48 | { | 48 | { |
49 | static int pci_irq_table[MAX_DEV][IRQ_LINES] = { | 49 | static int pci_irq_table[MAX_DEV][IRQ_LINES] = { |
50 | { IXP4XX_GPIO_IRQ(INTE), -1, -1 }, | 50 | { IXP4XX_GPIO_IRQ(INTE), -1, -1 }, |
diff --git a/arch/arm/mach-ixp4xx/fsg-pci.c b/arch/arm/mach-ixp4xx/fsg-pci.c index 44ccde9d4879..d2ac803328f7 100644 --- a/arch/arm/mach-ixp4xx/fsg-pci.c +++ b/arch/arm/mach-ixp4xx/fsg-pci.c | |||
@@ -38,7 +38,7 @@ void __init fsg_pci_preinit(void) | |||
38 | ixp4xx_pci_preinit(); | 38 | ixp4xx_pci_preinit(); |
39 | } | 39 | } |
40 | 40 | ||
41 | static int __init fsg_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 41 | static int __init fsg_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
42 | { | 42 | { |
43 | static int pci_irq_table[IRQ_LINES] = { | 43 | static int pci_irq_table[IRQ_LINES] = { |
44 | IXP4XX_GPIO_IRQ(INTC), | 44 | IXP4XX_GPIO_IRQ(INTC), |
diff --git a/arch/arm/mach-ixp4xx/gateway7001-pci.c b/arch/arm/mach-ixp4xx/gateway7001-pci.c index fc1124168874..76581fb467c4 100644 --- a/arch/arm/mach-ixp4xx/gateway7001-pci.c +++ b/arch/arm/mach-ixp4xx/gateway7001-pci.c | |||
@@ -35,7 +35,8 @@ void __init gateway7001_pci_preinit(void) | |||
35 | ixp4xx_pci_preinit(); | 35 | ixp4xx_pci_preinit(); |
36 | } | 36 | } |
37 | 37 | ||
38 | static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 38 | static int __init gateway7001_map_irq(const struct pci_dev *dev, u8 slot, |
39 | u8 pin) | ||
39 | { | 40 | { |
40 | if (slot == 1) | 41 | if (slot == 1) |
41 | return IRQ_IXP4XX_GPIO11; | 42 | return IRQ_IXP4XX_GPIO11; |
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index 3e8c0e33b59c..249404d264b7 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c | |||
@@ -462,7 +462,7 @@ static void __init gmlr_pci_postinit(void) | |||
462 | } | 462 | } |
463 | } | 463 | } |
464 | 464 | ||
465 | static int __init gmlr_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 465 | static int __init gmlr_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
466 | { | 466 | { |
467 | switch(slot) { | 467 | switch(slot) { |
468 | case SLOT_ETHA: return IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHA); | 468 | case SLOT_ETHA: return IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHA); |
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c index 38cc0725dbd8..d68fc068c38d 100644 --- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c | |||
@@ -49,7 +49,7 @@ void __init gtwx5715_pci_preinit(void) | |||
49 | } | 49 | } |
50 | 50 | ||
51 | 51 | ||
52 | static int __init gtwx5715_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 52 | static int __init gtwx5715_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
53 | { | 53 | { |
54 | int rc = -1; | 54 | int rc = -1; |
55 | 55 | ||
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c index 58f400417eaf..fffd8c5e40bf 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c | |||
@@ -43,7 +43,7 @@ void __init ixdp425_pci_preinit(void) | |||
43 | ixp4xx_pci_preinit(); | 43 | ixp4xx_pci_preinit(); |
44 | } | 44 | } |
45 | 45 | ||
46 | static int __init ixdp425_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 46 | static int __init ixdp425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
47 | { | 47 | { |
48 | static int pci_irq_table[IRQ_LINES] = { | 48 | static int pci_irq_table[IRQ_LINES] = { |
49 | IXP4XX_GPIO_IRQ(INTA), | 49 | IXP4XX_GPIO_IRQ(INTA), |
diff --git a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c index e64f6d041488..34efe75015ec 100644 --- a/arch/arm/mach-ixp4xx/ixdpg425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c | |||
@@ -31,7 +31,7 @@ void __init ixdpg425_pci_preinit(void) | |||
31 | ixp4xx_pci_preinit(); | 31 | ixp4xx_pci_preinit(); |
32 | } | 32 | } |
33 | 33 | ||
34 | static int __init ixdpg425_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 34 | static int __init ixdpg425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
35 | { | 35 | { |
36 | if (slot == 12 || slot == 13) | 36 | if (slot == 12 || slot == 13) |
37 | return IRQ_IXP4XX_GPIO7; | 37 | return IRQ_IXP4XX_GPIO7; |
diff --git a/arch/arm/mach-ixp4xx/nas100d-pci.c b/arch/arm/mach-ixp4xx/nas100d-pci.c index 428d1202b799..5434ccf553eb 100644 --- a/arch/arm/mach-ixp4xx/nas100d-pci.c +++ b/arch/arm/mach-ixp4xx/nas100d-pci.c | |||
@@ -41,7 +41,7 @@ void __init nas100d_pci_preinit(void) | |||
41 | ixp4xx_pci_preinit(); | 41 | ixp4xx_pci_preinit(); |
42 | } | 42 | } |
43 | 43 | ||
44 | static int __init nas100d_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 44 | static int __init nas100d_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
45 | { | 45 | { |
46 | static int pci_irq_table[MAX_DEV][IRQ_LINES] = { | 46 | static int pci_irq_table[MAX_DEV][IRQ_LINES] = { |
47 | { IXP4XX_GPIO_IRQ(INTA), -1, -1 }, | 47 | { IXP4XX_GPIO_IRQ(INTA), -1, -1 }, |
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c index 2e85f76b950d..b57160535e47 100644 --- a/arch/arm/mach-ixp4xx/nslu2-pci.c +++ b/arch/arm/mach-ixp4xx/nslu2-pci.c | |||
@@ -38,7 +38,7 @@ void __init nslu2_pci_preinit(void) | |||
38 | ixp4xx_pci_preinit(); | 38 | ixp4xx_pci_preinit(); |
39 | } | 39 | } |
40 | 40 | ||
41 | static int __init nslu2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 41 | static int __init nslu2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
42 | { | 42 | { |
43 | static int pci_irq_table[IRQ_LINES] = { | 43 | static int pci_irq_table[IRQ_LINES] = { |
44 | IXP4XX_GPIO_IRQ(INTA), | 44 | IXP4XX_GPIO_IRQ(INTA), |
diff --git a/arch/arm/mach-ixp4xx/vulcan-pci.c b/arch/arm/mach-ixp4xx/vulcan-pci.c index 03bdec5140a7..0bc3f34c282f 100644 --- a/arch/arm/mach-ixp4xx/vulcan-pci.c +++ b/arch/arm/mach-ixp4xx/vulcan-pci.c | |||
@@ -43,7 +43,7 @@ void __init vulcan_pci_preinit(void) | |||
43 | ixp4xx_pci_preinit(); | 43 | ixp4xx_pci_preinit(); |
44 | } | 44 | } |
45 | 45 | ||
46 | static int __init vulcan_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 46 | static int __init vulcan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
47 | { | 47 | { |
48 | if (slot == 1) | 48 | if (slot == 1) |
49 | return IXP4XX_GPIO_IRQ(INTA); | 49 | return IXP4XX_GPIO_IRQ(INTA); |
diff --git a/arch/arm/mach-ixp4xx/wg302v2-pci.c b/arch/arm/mach-ixp4xx/wg302v2-pci.c index 17f3cf59a31b..f27dfcfe811b 100644 --- a/arch/arm/mach-ixp4xx/wg302v2-pci.c +++ b/arch/arm/mach-ixp4xx/wg302v2-pci.c | |||
@@ -35,7 +35,7 @@ void __init wg302v2_pci_preinit(void) | |||
35 | ixp4xx_pci_preinit(); | 35 | ixp4xx_pci_preinit(); |
36 | } | 36 | } |
37 | 37 | ||
38 | static int __init wg302v2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 38 | static int __init wg302v2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
39 | { | 39 | { |
40 | if (slot == 1) | 40 | if (slot == 1) |
41 | return IRQ_IXP4XX_GPIO8; | 41 | return IRQ_IXP4XX_GPIO8; |