aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/setup.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-07-12 01:39:43 -0400
committerPaul Mackerras <paulus@samba.org>2006-07-31 01:55:04 -0400
commit954a46e2d5aec6f59976ddeb1d232b486e59b54a (patch)
tree4e34abf431de3d6a31036c1fdf33fa4dadeb2951 /arch/powerpc/platforms/pseries/setup.c
parenta7f67bdf2c9f24509b8e81e0f35573b611987c80 (diff)
[POWERPC] pseries: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. pseries platform changes. Built for pseries_defconfig Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r--arch/powerpc/platforms/pseries/setup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 54a52437265c..927e0a423b87 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -133,9 +133,9 @@ void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc,
133static void __init pseries_mpic_init_IRQ(void) 133static void __init pseries_mpic_init_IRQ(void)
134{ 134{
135 struct device_node *np, *old, *cascade = NULL; 135 struct device_node *np, *old, *cascade = NULL;
136 unsigned int *addrp; 136 const unsigned int *addrp;
137 unsigned long intack = 0; 137 unsigned long intack = 0;
138 unsigned int *opprop; 138 const unsigned int *opprop;
139 unsigned long openpic_addr = 0; 139 unsigned long openpic_addr = 0;
140 unsigned int cascade_irq; 140 unsigned int cascade_irq;
141 int naddr, n, i, opplen; 141 int naddr, n, i, opplen;
@@ -143,7 +143,7 @@ static void __init pseries_mpic_init_IRQ(void)
143 143
144 np = of_find_node_by_path("/"); 144 np = of_find_node_by_path("/");
145 naddr = prom_n_addr_cells(np); 145 naddr = prom_n_addr_cells(np);
146 opprop = (unsigned int *) get_property(np, "platform-open-pic", &opplen); 146 opprop = get_property(np, "platform-open-pic", &opplen);
147 if (opprop != 0) { 147 if (opprop != 0) {
148 openpic_addr = of_read_number(opprop, naddr); 148 openpic_addr = of_read_number(opprop, naddr);
149 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); 149 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
@@ -192,7 +192,7 @@ static void __init pseries_mpic_init_IRQ(void)
192 break; 192 break;
193 if (strcmp(np->name, "pci") != 0) 193 if (strcmp(np->name, "pci") != 0)
194 continue; 194 continue;
195 addrp = (u32 *)get_property(np, "8259-interrupt-acknowledge", 195 addrp = get_property(np, "8259-interrupt-acknowledge",
196 NULL); 196 NULL);
197 if (addrp == NULL) 197 if (addrp == NULL)
198 continue; 198 continue;
@@ -249,11 +249,11 @@ static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
249static void __init pseries_discover_pic(void) 249static void __init pseries_discover_pic(void)
250{ 250{
251 struct device_node *np; 251 struct device_node *np;
252 char *typep; 252 const char *typep;
253 253
254 for (np = NULL; (np = of_find_node_by_name(np, 254 for (np = NULL; (np = of_find_node_by_name(np,
255 "interrupt-controller"));) { 255 "interrupt-controller"));) {
256 typep = (char *)get_property(np, "compatible", NULL); 256 typep = get_property(np, "compatible", NULL);
257 if (strstr(typep, "open-pic")) { 257 if (strstr(typep, "open-pic")) {
258 pSeries_mpic_node = of_node_get(np); 258 pSeries_mpic_node = of_node_get(np);
259 ppc_md.init_IRQ = pseries_mpic_init_IRQ; 259 ppc_md.init_IRQ = pseries_mpic_init_IRQ;