aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c12
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c4
-rw-r--r--arch/powerpc/platforms/pseries/eeh_event.c4
-rw-r--r--arch/powerpc/platforms/pseries/firmware.c2
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c13
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c10
-rw-r--r--arch/powerpc/platforms/pseries/nvram.c5
-rw-r--r--arch/powerpc/platforms/pseries/pci.c2
-rw-r--r--arch/powerpc/platforms/pseries/ras.c4
-rw-r--r--arch/powerpc/platforms/pseries/rtasd.c4
-rw-r--r--arch/powerpc/platforms/pseries/setup.c12
-rw-r--r--arch/powerpc/platforms/pseries/smp.c8
-rw-r--r--arch/powerpc/platforms/pseries/xics.c22
-rw-r--r--drivers/char/hvc_vio.c4
-rw-r--r--drivers/char/hvsi.c7
-rw-r--r--drivers/pci/hotplug/rpaphp_core.c32
16 files changed, 72 insertions, 73 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 32eaddfa5470..5a23ce5e16ff 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -691,11 +691,11 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
691{ 691{
692 struct eeh_early_enable_info *info = data; 692 struct eeh_early_enable_info *info = data;
693 int ret; 693 int ret;
694 char *status = get_property(dn, "status", NULL); 694 const char *status = get_property(dn, "status", NULL);
695 u32 *class_code = (u32 *)get_property(dn, "class-code", NULL); 695 const u32 *class_code = get_property(dn, "class-code", NULL);
696 u32 *vendor_id = (u32 *)get_property(dn, "vendor-id", NULL); 696 const u32 *vendor_id = get_property(dn, "vendor-id", NULL);
697 u32 *device_id = (u32 *)get_property(dn, "device-id", NULL); 697 const u32 *device_id = get_property(dn, "device-id", NULL);
698 u32 *regs; 698 const u32 *regs;
699 int enable; 699 int enable;
700 struct pci_dn *pdn = PCI_DN(dn); 700 struct pci_dn *pdn = PCI_DN(dn);
701 701
@@ -737,7 +737,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
737 737
738 /* Ok... see if this device supports EEH. Some do, some don't, 738 /* Ok... see if this device supports EEH. Some do, some don't,
739 * and the only way to find out is to check each and every one. */ 739 * and the only way to find out is to check each and every one. */
740 regs = (u32 *)get_property(dn, "reg", NULL); 740 regs = get_property(dn, "reg", NULL);
741 if (regs) { 741 if (regs) {
742 /* First register entry is addr (00BBSS00) */ 742 /* First register entry is addr (00BBSS00) */
743 /* Try to enable eeh */ 743 /* Try to enable eeh */
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index aaad2c0afcbf..3269d2cd428b 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -268,14 +268,14 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
268 268
269 if (!frozen_dn) { 269 if (!frozen_dn) {
270 270
271 location = (char *) get_property(event->dn, "ibm,loc-code", NULL); 271 location = get_property(event->dn, "ibm,loc-code", NULL);
272 location = location ? location : "unknown"; 272 location = location ? location : "unknown";
273 printk(KERN_ERR "EEH: Error: Cannot find partition endpoint " 273 printk(KERN_ERR "EEH: Error: Cannot find partition endpoint "
274 "for location=%s pci addr=%s\n", 274 "for location=%s pci addr=%s\n",
275 location, pci_name(event->dev)); 275 location, pci_name(event->dev));
276 return NULL; 276 return NULL;
277 } 277 }
278 location = (char *) get_property(frozen_dn, "ibm,loc-code", NULL); 278 location = get_property(frozen_dn, "ibm,loc-code", NULL);
279 location = location ? location : "unknown"; 279 location = location ? location : "unknown";
280 280
281 /* There are two different styles for coming up with the PE. 281 /* There are two different styles for coming up with the PE.
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c
index 45ccc687e57c..137077451316 100644
--- a/arch/powerpc/platforms/pseries/eeh_event.c
+++ b/arch/powerpc/platforms/pseries/eeh_event.c
@@ -124,11 +124,11 @@ int eeh_send_failure_event (struct device_node *dn,
124{ 124{
125 unsigned long flags; 125 unsigned long flags;
126 struct eeh_event *event; 126 struct eeh_event *event;
127 char *location; 127 const char *location;
128 128
129 if (!mem_init_done) { 129 if (!mem_init_done) {
130 printk(KERN_ERR "EEH: event during early boot not handled\n"); 130 printk(KERN_ERR "EEH: event during early boot not handled\n");
131 location = (char *) get_property(dn, "ibm,loc-code", NULL); 131 location = get_property(dn, "ibm,loc-code", NULL);
132 printk(KERN_ERR "EEH: device node = %s\n", dn->full_name); 132 printk(KERN_ERR "EEH: device node = %s\n", dn->full_name);
133 printk(KERN_ERR "EEH: PCI location = %s\n", location); 133 printk(KERN_ERR "EEH: PCI location = %s\n", location);
134 return 1; 134 return 1;
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c
index c01d8f0cbe6d..1c7b2baa5f73 100644
--- a/arch/powerpc/platforms/pseries/firmware.c
+++ b/arch/powerpc/platforms/pseries/firmware.c
@@ -68,7 +68,7 @@ firmware_features_table[FIRMWARE_MAX_FEATURES] = {
68void __init fw_feature_init(void) 68void __init fw_feature_init(void)
69{ 69{
70 struct device_node *dn; 70 struct device_node *dn;
71 char *hypertas, *s; 71 const char *hypertas, *s;
72 int len, i; 72 int len, i;
73 73
74 DBG(" -> fw_feature_init()\n"); 74 DBG(" -> fw_feature_init()\n");
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index d67af2c65754..bbf2e34dc358 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -267,13 +267,12 @@ static void iommu_table_setparms(struct pci_controller *phb,
267 struct iommu_table *tbl) 267 struct iommu_table *tbl)
268{ 268{
269 struct device_node *node; 269 struct device_node *node;
270 unsigned long *basep; 270 const unsigned long *basep, *sizep;
271 unsigned int *sizep;
272 271
273 node = (struct device_node *)phb->arch_data; 272 node = (struct device_node *)phb->arch_data;
274 273
275 basep = (unsigned long *)get_property(node, "linux,tce-base", NULL); 274 basep = get_property(node, "linux,tce-base", NULL);
276 sizep = (unsigned int *)get_property(node, "linux,tce-size", NULL); 275 sizep = get_property(node, "linux,tce-size", NULL);
277 if (basep == NULL || sizep == NULL) { 276 if (basep == NULL || sizep == NULL) {
278 printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has " 277 printk(KERN_ERR "PCI_DMA: iommu_table_setparms: %s has "
279 "missing tce entries !\n", dn->full_name); 278 "missing tce entries !\n", dn->full_name);
@@ -315,7 +314,7 @@ static void iommu_table_setparms(struct pci_controller *phb,
315static void iommu_table_setparms_lpar(struct pci_controller *phb, 314static void iommu_table_setparms_lpar(struct pci_controller *phb,
316 struct device_node *dn, 315 struct device_node *dn,
317 struct iommu_table *tbl, 316 struct iommu_table *tbl,
318 unsigned char *dma_window) 317 const void *dma_window)
319{ 318{
320 unsigned long offset, size; 319 unsigned long offset, size;
321 320
@@ -415,7 +414,7 @@ static void iommu_bus_setup_pSeriesLP(struct pci_bus *bus)
415 struct iommu_table *tbl; 414 struct iommu_table *tbl;
416 struct device_node *dn, *pdn; 415 struct device_node *dn, *pdn;
417 struct pci_dn *ppci; 416 struct pci_dn *ppci;
418 unsigned char *dma_window = NULL; 417 const void *dma_window = NULL;
419 418
420 DBG("iommu_bus_setup_pSeriesLP, bus %p, bus->self %p\n", bus, bus->self); 419 DBG("iommu_bus_setup_pSeriesLP, bus %p, bus->self %p\n", bus, bus->self);
421 420
@@ -519,7 +518,7 @@ static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev)
519{ 518{
520 struct device_node *pdn, *dn; 519 struct device_node *pdn, *dn;
521 struct iommu_table *tbl; 520 struct iommu_table *tbl;
522 unsigned char *dma_window = NULL; 521 const void *dma_window = NULL;
523 struct pci_dn *pci; 522 struct pci_dn *pci;
524 523
525 DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, pci_name(dev)); 524 DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, pci_name(dev));
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 3aeb40699042..4cb7ff227f72 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -204,20 +204,20 @@ void __init udbg_init_debug_lpar(void)
204void __init find_udbg_vterm(void) 204void __init find_udbg_vterm(void)
205{ 205{
206 struct device_node *stdout_node; 206 struct device_node *stdout_node;
207 u32 *termno; 207 const u32 *termno;
208 char *name; 208 const char *name;
209 int add_console; 209 int add_console;
210 210
211 /* find the boot console from /chosen/stdout */ 211 /* find the boot console from /chosen/stdout */
212 if (!of_chosen) 212 if (!of_chosen)
213 return; 213 return;
214 name = (char *)get_property(of_chosen, "linux,stdout-path", NULL); 214 name = get_property(of_chosen, "linux,stdout-path", NULL);
215 if (name == NULL) 215 if (name == NULL)
216 return; 216 return;
217 stdout_node = of_find_node_by_path(name); 217 stdout_node = of_find_node_by_path(name);
218 if (!stdout_node) 218 if (!stdout_node)
219 return; 219 return;
220 name = (char *)get_property(stdout_node, "name", NULL); 220 name = get_property(stdout_node, "name", NULL);
221 if (!name) { 221 if (!name) {
222 printk(KERN_WARNING "stdout node missing 'name' property!\n"); 222 printk(KERN_WARNING "stdout node missing 'name' property!\n");
223 goto out; 223 goto out;
@@ -228,7 +228,7 @@ void __init find_udbg_vterm(void)
228 /* Check if it's a virtual terminal */ 228 /* Check if it's a virtual terminal */
229 if (strncmp(name, "vty", 3) != 0) 229 if (strncmp(name, "vty", 3) != 0)
230 goto out; 230 goto out;
231 termno = (u32 *)get_property(stdout_node, "reg", NULL); 231 termno = get_property(stdout_node, "reg", NULL);
232 if (termno == NULL) 232 if (termno == NULL)
233 goto out; 233 goto out;
234 vtermno = termno[0]; 234 vtermno = termno[0];
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c
index 18abfb1f4e24..64163cecdf93 100644
--- a/arch/powerpc/platforms/pseries/nvram.c
+++ b/arch/powerpc/platforms/pseries/nvram.c
@@ -123,13 +123,14 @@ static ssize_t pSeries_nvram_get_size(void)
123int __init pSeries_nvram_init(void) 123int __init pSeries_nvram_init(void)
124{ 124{
125 struct device_node *nvram; 125 struct device_node *nvram;
126 unsigned int *nbytes_p, proplen; 126 const unsigned int *nbytes_p;
127 unsigned int proplen;
127 128
128 nvram = of_find_node_by_type(NULL, "nvram"); 129 nvram = of_find_node_by_type(NULL, "nvram");
129 if (nvram == NULL) 130 if (nvram == NULL)
130 return -ENODEV; 131 return -ENODEV;
131 132
132 nbytes_p = (unsigned int *)get_property(nvram, "#bytes", &proplen); 133 nbytes_p = get_property(nvram, "#bytes", &proplen);
133 if (nbytes_p == NULL || proplen != sizeof(unsigned int)) 134 if (nbytes_p == NULL || proplen != sizeof(unsigned int))
134 return -EIO; 135 return -EIO;
135 136
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c
index e97e67f5e079..410a6bcc4ca0 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -60,7 +60,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_name_device);
60static void __devinit check_s7a(void) 60static void __devinit check_s7a(void)
61{ 61{
62 struct device_node *root; 62 struct device_node *root;
63 char *model; 63 const char *model;
64 64
65 s7a_workaround = 0; 65 s7a_workaround = 0;
66 root = of_find_node_by_path("/"); 66 root = of_find_node_by_path("/");
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index 9df783088b61..0e6339ee45a1 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -79,7 +79,7 @@ static void request_ras_irqs(struct device_node *np,
79{ 79{
80 int i, index, count = 0; 80 int i, index, count = 0;
81 struct of_irq oirq; 81 struct of_irq oirq;
82 u32 *opicprop; 82 const u32 *opicprop;
83 unsigned int opicplen; 83 unsigned int opicplen;
84 unsigned int virqs[16]; 84 unsigned int virqs[16];
85 85
@@ -87,7 +87,7 @@ static void request_ras_irqs(struct device_node *np,
87 * map those interrupts using the default interrupt host and default 87 * map those interrupts using the default interrupt host and default
88 * trigger 88 * trigger
89 */ 89 */
90 opicprop = (u32 *)get_property(np, "open-pic-interrupt", &opicplen); 90 opicprop = get_property(np, "open-pic-interrupt", &opicplen);
91 if (opicprop) { 91 if (opicprop) {
92 opicplen /= sizeof(u32); 92 opicplen /= sizeof(u32);
93 for (i = 0; i < opicplen; i++) { 93 for (i = 0; i < opicplen; i++) {
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
index 2e4e04042d85..8ca2612221d6 100644
--- a/arch/powerpc/platforms/pseries/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
@@ -359,11 +359,11 @@ static int enable_surveillance(int timeout)
359static int get_eventscan_parms(void) 359static int get_eventscan_parms(void)
360{ 360{
361 struct device_node *node; 361 struct device_node *node;
362 int *ip; 362 const int *ip;
363 363
364 node = of_find_node_by_path("/rtas"); 364 node = of_find_node_by_path("/rtas");
365 365
366 ip = (int *)get_property(node, "rtas-event-scan-rate", NULL); 366 ip = get_property(node, "rtas-event-scan-rate", NULL);
367 if (ip == NULL) { 367 if (ip == NULL) {
368 printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n"); 368 printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n");
369 of_node_put(node); 369 of_node_put(node);
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;
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index ac61098ff401..f39dad8b99e0 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -145,9 +145,9 @@ static int pSeries_add_processor(struct device_node *np)
145 unsigned int cpu; 145 unsigned int cpu;
146 cpumask_t candidate_map, tmp = CPU_MASK_NONE; 146 cpumask_t candidate_map, tmp = CPU_MASK_NONE;
147 int err = -ENOSPC, len, nthreads, i; 147 int err = -ENOSPC, len, nthreads, i;
148 u32 *intserv; 148 const u32 *intserv;
149 149
150 intserv = (u32 *)get_property(np, "ibm,ppc-interrupt-server#s", &len); 150 intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len);
151 if (!intserv) 151 if (!intserv)
152 return 0; 152 return 0;
153 153
@@ -205,9 +205,9 @@ static void pSeries_remove_processor(struct device_node *np)
205{ 205{
206 unsigned int cpu; 206 unsigned int cpu;
207 int len, nthreads, i; 207 int len, nthreads, i;
208 u32 *intserv; 208 const u32 *intserv;
209 209
210 intserv = (u32 *)get_property(np, "ibm,ppc-interrupt-server#s", &len); 210 intserv = get_property(np, "ibm,ppc-interrupt-server#s", &len);
211 if (!intserv) 211 if (!intserv)
212 return; 212 return;
213 213
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 716972aa9777..756421049441 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -604,14 +604,14 @@ static void __init xics_init_one_node(struct device_node *np,
604 unsigned int *indx) 604 unsigned int *indx)
605{ 605{
606 unsigned int ilen; 606 unsigned int ilen;
607 u32 *ireg; 607 const u32 *ireg;
608 608
609 /* This code does the theorically broken assumption that the interrupt 609 /* This code does the theorically broken assumption that the interrupt
610 * server numbers are the same as the hard CPU numbers. 610 * server numbers are the same as the hard CPU numbers.
611 * This happens to be the case so far but we are playing with fire... 611 * This happens to be the case so far but we are playing with fire...
612 * should be fixed one of these days. -BenH. 612 * should be fixed one of these days. -BenH.
613 */ 613 */
614 ireg = (u32 *)get_property(np, "ibm,interrupt-server-ranges", NULL); 614 ireg = get_property(np, "ibm,interrupt-server-ranges", NULL);
615 615
616 /* Do that ever happen ? we'll know soon enough... but even good'old 616 /* Do that ever happen ? we'll know soon enough... but even good'old
617 * f80 does have that property .. 617 * f80 does have that property ..
@@ -623,7 +623,7 @@ static void __init xics_init_one_node(struct device_node *np,
623 */ 623 */
624 *indx = *ireg; 624 *indx = *ireg;
625 } 625 }
626 ireg = (u32 *)get_property(np, "reg", &ilen); 626 ireg = get_property(np, "reg", &ilen);
627 if (!ireg) 627 if (!ireg)
628 panic("xics_init_IRQ: can't find interrupt reg property"); 628 panic("xics_init_IRQ: can't find interrupt reg property");
629 629
@@ -649,7 +649,7 @@ static void __init xics_setup_8259_cascade(void)
649{ 649{
650 struct device_node *np, *old, *found = NULL; 650 struct device_node *np, *old, *found = NULL;
651 int cascade, naddr; 651 int cascade, naddr;
652 u32 *addrp; 652 const u32 *addrp;
653 unsigned long intack = 0; 653 unsigned long intack = 0;
654 654
655 for_each_node_by_type(np, "interrupt-controller") 655 for_each_node_by_type(np, "interrupt-controller")
@@ -675,7 +675,7 @@ static void __init xics_setup_8259_cascade(void)
675 break; 675 break;
676 if (strcmp(np->name, "pci") != 0) 676 if (strcmp(np->name, "pci") != 0)
677 continue; 677 continue;
678 addrp = (u32 *)get_property(np, "8259-interrupt-acknowledge", NULL); 678 addrp = get_property(np, "8259-interrupt-acknowledge", NULL);
679 if (addrp == NULL) 679 if (addrp == NULL)
680 continue; 680 continue;
681 naddr = prom_n_addr_cells(np); 681 naddr = prom_n_addr_cells(np);
@@ -694,7 +694,8 @@ void __init xics_init_IRQ(void)
694{ 694{
695 int i; 695 int i;
696 struct device_node *np; 696 struct device_node *np;
697 u32 *ireg, ilen, indx = 0; 697 u32 ilen, indx = 0;
698 const u32 *ireg;
698 int found = 0; 699 int found = 0;
699 700
700 ppc64_boot_msg(0x20, "XICS Init"); 701 ppc64_boot_msg(0x20, "XICS Init");
@@ -719,18 +720,17 @@ void __init xics_init_IRQ(void)
719 for (np = of_find_node_by_type(NULL, "cpu"); 720 for (np = of_find_node_by_type(NULL, "cpu");
720 np; 721 np;
721 np = of_find_node_by_type(np, "cpu")) { 722 np = of_find_node_by_type(np, "cpu")) {
722 ireg = (u32 *)get_property(np, "reg", &ilen); 723 ireg = get_property(np, "reg", &ilen);
723 if (ireg && ireg[0] == get_hard_smp_processor_id(boot_cpuid)) { 724 if (ireg && ireg[0] == get_hard_smp_processor_id(boot_cpuid)) {
724 ireg = (u32 *)get_property(np, 725 ireg = get_property(np,
725 "ibm,ppc-interrupt-gserver#s", 726 "ibm,ppc-interrupt-gserver#s", &ilen);
726 &ilen);
727 i = ilen / sizeof(int); 727 i = ilen / sizeof(int);
728 if (ireg && i > 0) { 728 if (ireg && i > 0) {
729 default_server = ireg[0]; 729 default_server = ireg[0];
730 /* take last element */ 730 /* take last element */
731 default_distrib_server = ireg[i-1]; 731 default_distrib_server = ireg[i-1];
732 } 732 }
733 ireg = (u32 *)get_property(np, 733 ireg = get_property(np,
734 "ibm,interrupt-server#-size", NULL); 734 "ibm,interrupt-server#-size", NULL);
735 if (ireg) 735 if (ireg)
736 interrupt_server_size = *ireg; 736 interrupt_server_size = *ireg;
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c
index 651e5d25f58b..cc95941148fb 100644
--- a/drivers/char/hvc_vio.c
+++ b/drivers/char/hvc_vio.c
@@ -141,7 +141,7 @@ static int hvc_find_vtys(void)
141 141
142 for (vty = of_find_node_by_name(NULL, "vty"); vty != NULL; 142 for (vty = of_find_node_by_name(NULL, "vty"); vty != NULL;
143 vty = of_find_node_by_name(vty, "vty")) { 143 vty = of_find_node_by_name(vty, "vty")) {
144 uint32_t *vtermno; 144 const uint32_t *vtermno;
145 145
146 /* We have statically defined space for only a certain number 146 /* We have statically defined space for only a certain number
147 * of console adapters. 147 * of console adapters.
@@ -149,7 +149,7 @@ static int hvc_find_vtys(void)
149 if (num_found >= MAX_NR_HVC_CONSOLES) 149 if (num_found >= MAX_NR_HVC_CONSOLES)
150 break; 150 break;
151 151
152 vtermno = (uint32_t *)get_property(vty, "reg", NULL); 152 vtermno = get_property(vty, "reg", NULL);
153 if (!vtermno) 153 if (!vtermno)
154 continue; 154 continue;
155 155
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c
index 56612a2dca6b..542de0e51f35 100644
--- a/drivers/char/hvsi.c
+++ b/drivers/char/hvsi.c
@@ -1276,11 +1276,10 @@ static int __init hvsi_console_init(void)
1276 vty != NULL; 1276 vty != NULL;
1277 vty = of_find_compatible_node(vty, "serial", "hvterm-protocol")) { 1277 vty = of_find_compatible_node(vty, "serial", "hvterm-protocol")) {
1278 struct hvsi_struct *hp; 1278 struct hvsi_struct *hp;
1279 uint32_t *vtermno; 1279 const uint32_t *vtermno, *irq;
1280 uint32_t *irq;
1281 1280
1282 vtermno = (uint32_t *)get_property(vty, "reg", NULL); 1281 vtermno = get_property(vty, "reg", NULL);
1283 irq = (uint32_t *)get_property(vty, "interrupts", NULL); 1282 irq = get_property(vty, "interrupts", NULL);
1284 if (!vtermno || !irq) 1283 if (!vtermno || !irq)
1285 continue; 1284 continue;
1286 1285
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
index 076bd6dcafae..7288a3eccfb3 100644
--- a/drivers/pci/hotplug/rpaphp_core.c
+++ b/drivers/pci/hotplug/rpaphp_core.c
@@ -176,16 +176,16 @@ static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe
176 return 0; 176 return 0;
177} 177}
178 178
179static int get_children_props(struct device_node *dn, int **drc_indexes, 179static int get_children_props(struct device_node *dn, const int **drc_indexes,
180 int **drc_names, int **drc_types, int **drc_power_domains) 180 const int **drc_names, const int **drc_types,
181 const int **drc_power_domains)
181{ 182{
182 int *indexes, *names; 183 const int *indexes, *names, *types, *domains;
183 int *types, *domains;
184 184
185 indexes = (int *) get_property(dn, "ibm,drc-indexes", NULL); 185 indexes = get_property(dn, "ibm,drc-indexes", NULL);
186 names = (int *) get_property(dn, "ibm,drc-names", NULL); 186 names = get_property(dn, "ibm,drc-names", NULL);
187 types = (int *) get_property(dn, "ibm,drc-types", NULL); 187 types = get_property(dn, "ibm,drc-types", NULL);
188 domains = (int *) get_property(dn, "ibm,drc-power-domains", NULL); 188 domains = get_property(dn, "ibm,drc-power-domains", NULL);
189 189
190 if (!indexes || !names || !types || !domains) { 190 if (!indexes || !names || !types || !domains) {
191 /* Slot does not have dynamically-removable children */ 191 /* Slot does not have dynamically-removable children */
@@ -212,13 +212,13 @@ static int get_children_props(struct device_node *dn, int **drc_indexes,
212int rpaphp_get_drc_props(struct device_node *dn, int *drc_index, 212int rpaphp_get_drc_props(struct device_node *dn, int *drc_index,
213 char **drc_name, char **drc_type, int *drc_power_domain) 213 char **drc_name, char **drc_type, int *drc_power_domain)
214{ 214{
215 int *indexes, *names; 215 const int *indexes, *names;
216 int *types, *domains; 216 const int *types, *domains;
217 unsigned int *my_index; 217 const unsigned int *my_index;
218 char *name_tmp, *type_tmp; 218 char *name_tmp, *type_tmp;
219 int i, rc; 219 int i, rc;
220 220
221 my_index = (int *) get_property(dn, "ibm,my-drc-index", NULL); 221 my_index = get_property(dn, "ibm,my-drc-index", NULL);
222 if (!my_index) { 222 if (!my_index) {
223 /* Node isn't DLPAR/hotplug capable */ 223 /* Node isn't DLPAR/hotplug capable */
224 return -EINVAL; 224 return -EINVAL;
@@ -265,10 +265,10 @@ static int is_php_type(char *drc_type)
265 return 1; 265 return 1;
266} 266}
267 267
268static int is_php_dn(struct device_node *dn, int **indexes, int **names, 268static int is_php_dn(struct device_node *dn, const int **indexes,
269 int **types, int **power_domains) 269 const int **names, const int **types, const int **power_domains)
270{ 270{
271 int *drc_types; 271 const int *drc_types;
272 int rc; 272 int rc;
273 273
274 rc = get_children_props(dn, indexes, names, &drc_types, power_domains); 274 rc = get_children_props(dn, indexes, names, &drc_types, power_domains);
@@ -296,7 +296,7 @@ int rpaphp_add_slot(struct device_node *dn)
296 struct slot *slot; 296 struct slot *slot;
297 int retval = 0; 297 int retval = 0;
298 int i; 298 int i;
299 int *indexes, *names, *types, *power_domains; 299 const int *indexes, *names, *types, *power_domains;
300 char *name, *type; 300 char *name, *type;
301 301
302 dbg("Entry %s: dn->full_name=%s\n", __FUNCTION__, dn->full_name); 302 dbg("Entry %s: dn->full_name=%s\n", __FUNCTION__, dn->full_name);