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-orion5x | |
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-orion5x')
-rw-r--r-- | arch/arm/mach-orion5x/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/db88f5281-setup.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/dns323-setup.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/kurobox_pro-setup.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/mss2-setup.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/rd88f5182-setup.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/terastation_pro2-setup.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/ts209-setup.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/ts409-setup.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/wnr854t-setup.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/wrt350n-v2-setup.c | 3 |
14 files changed, 22 insertions, 15 deletions
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index f2b2b35e8646..3e5499dda49a 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -51,7 +51,7 @@ void orion5x_pci_disable(void); | |||
51 | void orion5x_pci_set_cardbus_mode(void); | 51 | void orion5x_pci_set_cardbus_mode(void); |
52 | int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); | 52 | int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); |
53 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); | 53 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); |
54 | int orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin); | 54 | int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
55 | 55 | ||
56 | struct machine_desc; | 56 | struct machine_desc; |
57 | struct meminfo; | 57 | struct meminfo; |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index f95d3cb01cbf..a3e3e9e5e328 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -237,7 +237,8 @@ void __init db88f5281_pci_preinit(void) | |||
237 | } | 237 | } |
238 | } | 238 | } |
239 | 239 | ||
240 | static int __init db88f5281_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 240 | static int __init db88f5281_pci_map_irq(const struct pci_dev *dev, u8 slot, |
241 | u8 pin) | ||
241 | { | 242 | { |
242 | int irq; | 243 | int irq; |
243 | 244 | ||
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 855e0e77d563..a6eddae82a0b 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -70,14 +70,14 @@ enum { | |||
70 | * PCI setup | 70 | * PCI setup |
71 | */ | 71 | */ |
72 | 72 | ||
73 | static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 73 | static int __init dns323_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
74 | { | 74 | { |
75 | int irq; | 75 | int irq; |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * Check for devices with hard-wired IRQs. | 78 | * Check for devices with hard-wired IRQs. |
79 | */ | 79 | */ |
80 | irq = orion5x_pci_map_irq(dev, slot, pin); | 80 | irq = orion5x_pci_map_irq(const dev, slot, pin); |
81 | if (irq != -1) | 81 | if (irq != -1) |
82 | return irq; | 82 | return irq; |
83 | 83 | ||
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index c0eb6462633f..00381249d766 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -119,7 +119,8 @@ static struct platform_device kurobox_pro_nor_flash = { | |||
119 | * PCI | 119 | * PCI |
120 | ****************************************************************************/ | 120 | ****************************************************************************/ |
121 | 121 | ||
122 | static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 122 | static int __init kurobox_pro_pci_map_irq(const struct pci_dev *dev, u8 slot, |
123 | u8 pin) | ||
123 | { | 124 | { |
124 | int irq; | 125 | int irq; |
125 | 126 | ||
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c index 59263b73d1e4..ef3bb8e9a4c2 100644 --- a/arch/arm/mach-orion5x/mss2-setup.c +++ b/arch/arm/mach-orion5x/mss2-setup.c | |||
@@ -73,7 +73,7 @@ static struct platform_device mss2_nor_flash = { | |||
73 | /**************************************************************************** | 73 | /**************************************************************************** |
74 | * PCI setup | 74 | * PCI setup |
75 | ****************************************************************************/ | 75 | ****************************************************************************/ |
76 | static int __init mss2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 76 | static int __init mss2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
77 | { | 77 | { |
78 | int irq; | 78 | int irq; |
79 | 79 | ||
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index e8706f15a670..0415250396d4 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -587,7 +587,7 @@ struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys | |||
587 | return bus; | 587 | return bus; |
588 | } | 588 | } |
589 | 589 | ||
590 | int __init orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 590 | int __init orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
591 | { | 591 | { |
592 | int bus = dev->bus->number; | 592 | int bus = dev->bus->number; |
593 | 593 | ||
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index 9eec7c2375e9..291d22bf44c9 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | |||
@@ -131,7 +131,7 @@ static void __init rd88f5181l_fxo_init(void) | |||
131 | } | 131 | } |
132 | 132 | ||
133 | static int __init | 133 | static int __init |
134 | rd88f5181l_fxo_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 134 | rd88f5181l_fxo_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
135 | { | 135 | { |
136 | int irq; | 136 | int irq; |
137 | 137 | ||
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index 0cc90bbfd326..3f02362e1632 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
@@ -140,7 +140,7 @@ static void __init rd88f5181l_ge_init(void) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | static int __init | 142 | static int __init |
143 | rd88f5181l_ge_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 143 | rd88f5181l_ge_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
144 | { | 144 | { |
145 | int irq; | 145 | int irq; |
146 | 146 | ||
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index 48da39b9bdb0..27fd38e658bd 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -172,7 +172,8 @@ void __init rd88f5182_pci_preinit(void) | |||
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | static int __init rd88f5182_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 175 | static int __init rd88f5182_pci_map_irq(const struct pci_dev *dev, u8 slot, |
176 | u8 pin) | ||
176 | { | 177 | { |
177 | int irq; | 178 | int irq; |
178 | 179 | ||
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c index 29ce826c3c21..a34e4fac72b0 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c | |||
@@ -100,7 +100,7 @@ void __init tsp2_pci_preinit(void) | |||
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | static int __init tsp2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 103 | static int __init tsp2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
104 | { | 104 | { |
105 | int irq; | 105 | int irq; |
106 | 106 | ||
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index 47162fd5f044..c9831614e355 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -143,7 +143,8 @@ void __init qnap_ts209_pci_preinit(void) | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 146 | static int __init qnap_ts209_pci_map_irq(const struct pci_dev *dev, u8 slot, |
147 | u8 pin) | ||
147 | { | 148 | { |
148 | int irq; | 149 | int irq; |
149 | 150 | ||
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index 5aacc7ac5cf4..cc33b2222bad 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
@@ -121,7 +121,8 @@ static struct platform_device qnap_ts409_nor_flash = { | |||
121 | * PCI | 121 | * PCI |
122 | ****************************************************************************/ | 122 | ****************************************************************************/ |
123 | 123 | ||
124 | static int __init qnap_ts409_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 124 | static int __init qnap_ts409_pci_map_irq(const struct pci_dev *dev, u8 slot, |
125 | u8 pin) | ||
125 | { | 126 | { |
126 | int irq; | 127 | int irq; |
127 | 128 | ||
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 444a1c7fdfd6..2653595f901c 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
@@ -133,7 +133,8 @@ static void __init wnr854t_init(void) | |||
133 | platform_device_register(&wnr854t_nor_flash); | 133 | platform_device_register(&wnr854t_nor_flash); |
134 | } | 134 | } |
135 | 135 | ||
136 | static int __init wnr854t_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 136 | static int __init wnr854t_pci_map_irq(const struct pci_dev *dev, u8 slot, |
137 | u8 pin) | ||
137 | { | 138 | { |
138 | int irq; | 139 | int irq; |
139 | 140 | ||
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index d1952be0ae1c..251ef1543e53 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
@@ -221,7 +221,8 @@ static void __init wrt350n_v2_init(void) | |||
221 | platform_device_register(&wrt350n_v2_button_device); | 221 | platform_device_register(&wrt350n_v2_button_device); |
222 | } | 222 | } |
223 | 223 | ||
224 | static int __init wrt350n_v2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 224 | static int __init wrt350n_v2_pci_map_irq(const struct pci_dev *dev, u8 slot, |
225 | u8 pin) | ||
225 | { | 226 | { |
226 | int irq; | 227 | int irq; |
227 | 228 | ||