aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-23 18:53:27 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 04:54:24 -0400
commit6a23acf3905287eb952a6f1dbbc8fb3e4eeae2f6 (patch)
tree71c1874e6ae1e00df81b5df5b78e3935f93f298b /arch
parent8271f04242af8ddf8390f289cd6ef78fb3e3c6d9 (diff)
[SPARC64]: constify of_get_property return: arch/sparc64
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/central.c12
-rw-r--r--arch/sparc64/kernel/chmc.c4
-rw-r--r--arch/sparc64/kernel/ebus.c2
-rw-r--r--arch/sparc64/kernel/irq.c2
-rw-r--r--arch/sparc64/kernel/isa.c2
-rw-r--r--arch/sparc64/kernel/of_device.c24
-rw-r--r--arch/sparc64/kernel/pci_sun4v.c8
-rw-r--r--arch/sparc64/kernel/prom.c24
-rw-r--r--arch/sparc64/kernel/sbus.c4
-rw-r--r--arch/sparc64/kernel/time.c4
-rw-r--r--arch/sparc64/solaris/misc.c3
11 files changed, 46 insertions, 43 deletions
diff --git a/arch/sparc64/kernel/central.c b/arch/sparc64/kernel/central.c
index e724c54af029..c65b2f9c98d8 100644
--- a/arch/sparc64/kernel/central.c
+++ b/arch/sparc64/kernel/central.c
@@ -32,7 +32,7 @@ static void central_probe_failure(int line)
32static void central_ranges_init(struct linux_central *central) 32static void central_ranges_init(struct linux_central *central)
33{ 33{
34 struct device_node *dp = central->prom_node; 34 struct device_node *dp = central->prom_node;
35 void *pval; 35 const void *pval;
36 int len; 36 int len;
37 37
38 central->num_central_ranges = 0; 38 central->num_central_ranges = 0;
@@ -47,7 +47,7 @@ static void central_ranges_init(struct linux_central *central)
47static void fhc_ranges_init(struct linux_fhc *fhc) 47static void fhc_ranges_init(struct linux_fhc *fhc)
48{ 48{
49 struct device_node *dp = fhc->prom_node; 49 struct device_node *dp = fhc->prom_node;
50 void *pval; 50 const void *pval;
51 int len; 51 int len;
52 52
53 fhc->num_fhc_ranges = 0; 53 fhc->num_fhc_ranges = 0;
@@ -119,7 +119,7 @@ static unsigned long prom_reg_to_paddr(struct linux_prom_registers *r)
119static void probe_other_fhcs(void) 119static void probe_other_fhcs(void)
120{ 120{
121 struct device_node *dp; 121 struct device_node *dp;
122 struct linux_prom64_registers *fpregs; 122 const struct linux_prom64_registers *fpregs;
123 123
124 for_each_node_by_name(dp, "fhc") { 124 for_each_node_by_name(dp, "fhc") {
125 struct linux_fhc *fhc; 125 struct linux_fhc *fhc;
@@ -190,7 +190,8 @@ static void probe_clock_board(struct linux_central *central,
190 struct device_node *fp) 190 struct device_node *fp)
191{ 191{
192 struct device_node *dp; 192 struct device_node *dp;
193 struct linux_prom_registers cregs[3], *pr; 193 struct linux_prom_registers cregs[3];
194 const struct linux_prom_registers *pr;
194 int nslots, tmp, nregs; 195 int nslots, tmp, nregs;
195 196
196 dp = fp->child; 197 dp = fp->child;
@@ -299,7 +300,8 @@ static void init_all_fhc_hw(void)
299 300
300void central_probe(void) 301void central_probe(void)
301{ 302{
302 struct linux_prom_registers fpregs[6], *pr; 303 struct linux_prom_registers fpregs[6];
304 const struct linux_prom_registers *pr;
303 struct linux_fhc *fhc; 305 struct linux_fhc *fhc;
304 struct device_node *dp, *fp; 306 struct device_node *dp, *fp;
305 int err; 307 int err;
diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c
index 9699abeb9907..777d34577045 100644
--- a/arch/sparc64/kernel/chmc.c
+++ b/arch/sparc64/kernel/chmc.c
@@ -343,8 +343,8 @@ static int init_one_mctrl(struct device_node *dp)
343{ 343{
344 struct mctrl_info *mp = kzalloc(sizeof(*mp), GFP_KERNEL); 344 struct mctrl_info *mp = kzalloc(sizeof(*mp), GFP_KERNEL);
345 int portid = of_getintprop_default(dp, "portid", -1); 345 int portid = of_getintprop_default(dp, "portid", -1);
346 struct linux_prom64_registers *regs; 346 const struct linux_prom64_registers *regs;
347 void *pval; 347 const void *pval;
348 int len; 348 int len;
349 349
350 if (!mp) 350 if (!mp)
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index 35bf895fdeee..1962bfa4ef3d 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -285,7 +285,7 @@ static void __init fill_ebus_child(struct device_node *dp,
285 int non_standard_regs) 285 int non_standard_regs)
286{ 286{
287 struct of_device *op; 287 struct of_device *op;
288 int *regs; 288 const int *regs;
289 int i, len; 289 int i, len;
290 290
291 dev->prom_node = dp; 291 dev->prom_node = dp;
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index d1bb3b3f2639..6241e3dbbd57 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -627,7 +627,7 @@ static u64 prom_limit0, prom_limit1;
627static void map_prom_timers(void) 627static void map_prom_timers(void)
628{ 628{
629 struct device_node *dp; 629 struct device_node *dp;
630 unsigned int *addr; 630 const unsigned int *addr;
631 631
632 /* PROM timer node hangs out in the top level of device siblings... */ 632 /* PROM timer node hangs out in the top level of device siblings... */
633 dp = of_find_node_by_path("/"); 633 dp = of_find_node_by_path("/");
diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c
index 98721a8f8619..791eeb7e3873 100644
--- a/arch/sparc64/kernel/isa.c
+++ b/arch/sparc64/kernel/isa.c
@@ -24,7 +24,7 @@ static void __init report_dev(struct sparc_isa_device *isa_dev, int child)
24 24
25static void __init isa_dev_get_resource(struct sparc_isa_device *isa_dev) 25static void __init isa_dev_get_resource(struct sparc_isa_device *isa_dev)
26{ 26{
27 struct linux_prom_registers *pregs; 27 const struct linux_prom_registers *pregs;
28 unsigned long base, len; 28 unsigned long base, len;
29 int prop_len; 29 int prop_len;
30 30
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index fb9bf1e4d036..6b8798141f2c 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -245,7 +245,7 @@ struct of_bus {
245 int *addrc, int *sizec); 245 int *addrc, int *sizec);
246 int (*map)(u32 *addr, const u32 *range, 246 int (*map)(u32 *addr, const u32 *range,
247 int na, int ns, int pna); 247 int na, int ns, int pna);
248 unsigned int (*get_flags)(u32 *addr); 248 unsigned int (*get_flags)(const u32 *addr);
249}; 249};
250 250
251/* 251/*
@@ -305,7 +305,7 @@ static int of_bus_default_map(u32 *addr, const u32 *range,
305 return 0; 305 return 0;
306} 306}
307 307
308static unsigned int of_bus_default_get_flags(u32 *addr) 308static unsigned int of_bus_default_get_flags(const u32 *addr)
309{ 309{
310 return IORESOURCE_MEM; 310 return IORESOURCE_MEM;
311} 311}
@@ -369,7 +369,7 @@ static int of_bus_pci_map(u32 *addr, const u32 *range,
369 return 0; 369 return 0;
370} 370}
371 371
372static unsigned int of_bus_pci_get_flags(u32 *addr) 372static unsigned int of_bus_pci_get_flags(const u32 *addr)
373{ 373{
374 unsigned int flags = 0; 374 unsigned int flags = 0;
375 u32 w = addr[0]; 375 u32 w = addr[0];
@@ -482,7 +482,7 @@ static int __init build_one_resource(struct device_node *parent,
482 u32 *addr, 482 u32 *addr,
483 int na, int ns, int pna) 483 int na, int ns, int pna)
484{ 484{
485 u32 *ranges; 485 const u32 *ranges;
486 unsigned int rlen; 486 unsigned int rlen;
487 int rone; 487 int rone;
488 488
@@ -513,7 +513,7 @@ static int __init build_one_resource(struct device_node *parent,
513 513
514static int __init use_1to1_mapping(struct device_node *pp) 514static int __init use_1to1_mapping(struct device_node *pp)
515{ 515{
516 char *model; 516 const char *model;
517 517
518 /* If this is on the PMU bus, don't try to translate it even 518 /* If this is on the PMU bus, don't try to translate it even
519 * if a ranges property exists. 519 * if a ranges property exists.
@@ -548,7 +548,7 @@ static void __init build_device_resources(struct of_device *op,
548 struct of_bus *bus; 548 struct of_bus *bus;
549 int na, ns; 549 int na, ns;
550 int index, num_reg; 550 int index, num_reg;
551 void *preg; 551 const void *preg;
552 552
553 if (!parent) 553 if (!parent)
554 return; 554 return;
@@ -578,7 +578,7 @@ static void __init build_device_resources(struct of_device *op,
578 for (index = 0; index < num_reg; index++) { 578 for (index = 0; index < num_reg; index++) {
579 struct resource *r = &op->resource[index]; 579 struct resource *r = &op->resource[index];
580 u32 addr[OF_MAX_ADDR_CELLS]; 580 u32 addr[OF_MAX_ADDR_CELLS];
581 u32 *reg = (preg + (index * ((na + ns) * 4))); 581 const u32 *reg = (preg + (index * ((na + ns) * 4)));
582 struct device_node *dp = op->node; 582 struct device_node *dp = op->node;
583 struct device_node *pp = p_op->node; 583 struct device_node *pp = p_op->node;
584 struct of_bus *pbus, *dbus; 584 struct of_bus *pbus, *dbus;
@@ -643,14 +643,14 @@ static void __init build_device_resources(struct of_device *op,
643 643
644static struct device_node * __init 644static struct device_node * __init
645apply_interrupt_map(struct device_node *dp, struct device_node *pp, 645apply_interrupt_map(struct device_node *dp, struct device_node *pp,
646 u32 *imap, int imlen, u32 *imask, 646 const u32 *imap, int imlen, const u32 *imask,
647 unsigned int *irq_p) 647 unsigned int *irq_p)
648{ 648{
649 struct device_node *cp; 649 struct device_node *cp;
650 unsigned int irq = *irq_p; 650 unsigned int irq = *irq_p;
651 struct of_bus *bus; 651 struct of_bus *bus;
652 phandle handle; 652 phandle handle;
653 u32 *reg; 653 const u32 *reg;
654 int na, num_reg, i; 654 int na, num_reg, i;
655 655
656 bus = of_match_bus(pp); 656 bus = of_match_bus(pp);
@@ -705,7 +705,7 @@ static unsigned int __init pci_irq_swizzle(struct device_node *dp,
705 struct device_node *pp, 705 struct device_node *pp,
706 unsigned int irq) 706 unsigned int irq)
707{ 707{
708 struct linux_prom_pci_registers *regs; 708 const struct linux_prom_pci_registers *regs;
709 unsigned int bus, devfn, slot, ret; 709 unsigned int bus, devfn, slot, ret;
710 710
711 if (irq < 1 || irq > 4) 711 if (irq < 1 || irq > 4)
@@ -794,7 +794,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
794 pp = dp->parent; 794 pp = dp->parent;
795 ip = NULL; 795 ip = NULL;
796 while (pp) { 796 while (pp) {
797 void *imap, *imsk; 797 const void *imap, *imsk;
798 int imlen; 798 int imlen;
799 799
800 imap = of_get_property(pp, "interrupt-map", &imlen); 800 imap = of_get_property(pp, "interrupt-map", &imlen);
@@ -859,7 +859,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
859 struct device *parent) 859 struct device *parent)
860{ 860{
861 struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL); 861 struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL);
862 unsigned int *irq; 862 const unsigned int *irq;
863 int len, i; 863 int len, i;
864 864
865 if (!op) 865 if (!op)
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c
index ec22cd61ec8c..bd74c155519e 100644
--- a/arch/sparc64/kernel/pci_sun4v.c
+++ b/arch/sparc64/kernel/pci_sun4v.c
@@ -1281,7 +1281,7 @@ h_error:
1281 1281
1282static void pci_sun4v_msi_init(struct pci_pbm_info *pbm) 1282static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
1283{ 1283{
1284 u32 *val; 1284 const u32 *val;
1285 int len; 1285 int len;
1286 1286
1287 val = of_get_property(pbm->prom_node, "#msi-eqs", &len); 1287 val = of_get_property(pbm->prom_node, "#msi-eqs", &len);
@@ -1289,16 +1289,16 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
1289 goto no_msi; 1289 goto no_msi;
1290 pbm->msiq_num = *val; 1290 pbm->msiq_num = *val;
1291 if (pbm->msiq_num) { 1291 if (pbm->msiq_num) {
1292 struct msiq_prop { 1292 const struct msiq_prop {
1293 u32 first_msiq; 1293 u32 first_msiq;
1294 u32 num_msiq; 1294 u32 num_msiq;
1295 u32 first_devino; 1295 u32 first_devino;
1296 } *mqp; 1296 } *mqp;
1297 struct msi_range_prop { 1297 const struct msi_range_prop {
1298 u32 first_msi; 1298 u32 first_msi;
1299 u32 num_msi; 1299 u32 num_msi;
1300 } *mrng; 1300 } *mrng;
1301 struct addr_range_prop { 1301 const struct addr_range_prop {
1302 u32 msi32_high; 1302 u32 msi32_high;
1303 u32 msi32_low; 1303 u32 msi32_low;
1304 u32 msi32_len; 1304 u32 msi32_len;
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index 0917c24c4f08..25b70368973c 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -196,7 +196,7 @@ EXPORT_SYMBOL(of_getintprop_default);
196 196
197int of_n_addr_cells(struct device_node *np) 197int of_n_addr_cells(struct device_node *np)
198{ 198{
199 int* ip; 199 const int* ip;
200 do { 200 do {
201 if (np->parent) 201 if (np->parent)
202 np = np->parent; 202 np = np->parent;
@@ -211,7 +211,7 @@ EXPORT_SYMBOL(of_n_addr_cells);
211 211
212int of_n_size_cells(struct device_node *np) 212int of_n_size_cells(struct device_node *np)
213{ 213{
214 int* ip; 214 const int* ip;
215 do { 215 do {
216 if (np->parent) 216 if (np->parent)
217 np = np->parent; 217 np = np->parent;
@@ -397,7 +397,7 @@ static unsigned int psycho_irq_build(struct device_node *dp,
397 397
398static void psycho_irq_trans_init(struct device_node *dp) 398static void psycho_irq_trans_init(struct device_node *dp)
399{ 399{
400 struct linux_prom64_registers *regs; 400 const struct linux_prom64_registers *regs;
401 401
402 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); 402 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller));
403 dp->irq_trans->irq_build = psycho_irq_build; 403 dp->irq_trans->irq_build = psycho_irq_build;
@@ -547,7 +547,7 @@ static unsigned long __sabre_onboard_imap_off[] = {
547static int sabre_device_needs_wsync(struct device_node *dp) 547static int sabre_device_needs_wsync(struct device_node *dp)
548{ 548{
549 struct device_node *parent = dp->parent; 549 struct device_node *parent = dp->parent;
550 char *parent_model, *parent_compat; 550 const char *parent_model, *parent_compat;
551 551
552 /* This traversal up towards the root is meant to 552 /* This traversal up towards the root is meant to
553 * handle two cases: 553 * handle two cases:
@@ -589,7 +589,7 @@ static unsigned int sabre_irq_build(struct device_node *dp,
589{ 589{
590 struct sabre_irq_data *irq_data = _data; 590 struct sabre_irq_data *irq_data = _data;
591 unsigned long controller_regs = irq_data->controller_regs; 591 unsigned long controller_regs = irq_data->controller_regs;
592 struct linux_prom_pci_registers *regs; 592 const struct linux_prom_pci_registers *regs;
593 unsigned long imap, iclr; 593 unsigned long imap, iclr;
594 unsigned long imap_off, iclr_off; 594 unsigned long imap_off, iclr_off;
595 int inofixup = 0; 595 int inofixup = 0;
@@ -639,9 +639,9 @@ static unsigned int sabre_irq_build(struct device_node *dp,
639 639
640static void sabre_irq_trans_init(struct device_node *dp) 640static void sabre_irq_trans_init(struct device_node *dp)
641{ 641{
642 struct linux_prom64_registers *regs; 642 const struct linux_prom64_registers *regs;
643 struct sabre_irq_data *irq_data; 643 struct sabre_irq_data *irq_data;
644 u32 *busrange; 644 const u32 *busrange;
645 645
646 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); 646 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller));
647 dp->irq_trans->irq_build = sabre_irq_build; 647 dp->irq_trans->irq_build = sabre_irq_build;
@@ -795,7 +795,7 @@ static unsigned int schizo_irq_build(struct device_node *dp,
795 795
796static void __schizo_irq_trans_init(struct device_node *dp, int is_tomatillo) 796static void __schizo_irq_trans_init(struct device_node *dp, int is_tomatillo)
797{ 797{
798 struct linux_prom64_registers *regs; 798 const struct linux_prom64_registers *regs;
799 struct schizo_irq_data *irq_data; 799 struct schizo_irq_data *irq_data;
800 800
801 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); 801 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller));
@@ -836,7 +836,7 @@ static unsigned int pci_sun4v_irq_build(struct device_node *dp,
836 836
837static void pci_sun4v_irq_trans_init(struct device_node *dp) 837static void pci_sun4v_irq_trans_init(struct device_node *dp)
838{ 838{
839 struct linux_prom64_registers *regs; 839 const struct linux_prom64_registers *regs;
840 840
841 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); 841 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller));
842 dp->irq_trans->irq_build = pci_sun4v_irq_build; 842 dp->irq_trans->irq_build = pci_sun4v_irq_build;
@@ -940,7 +940,7 @@ static unsigned int sbus_of_build_irq(struct device_node *dp,
940 void *_data) 940 void *_data)
941{ 941{
942 unsigned long reg_base = (unsigned long) _data; 942 unsigned long reg_base = (unsigned long) _data;
943 struct linux_prom_registers *regs; 943 const struct linux_prom_registers *regs;
944 unsigned long imap, iclr; 944 unsigned long imap, iclr;
945 int sbus_slot = 0; 945 int sbus_slot = 0;
946 int sbus_level = 0; 946 int sbus_level = 0;
@@ -994,7 +994,7 @@ static unsigned int sbus_of_build_irq(struct device_node *dp,
994 994
995static void sbus_irq_trans_init(struct device_node *dp) 995static void sbus_irq_trans_init(struct device_node *dp)
996{ 996{
997 struct linux_prom64_registers *regs; 997 const struct linux_prom64_registers *regs;
998 998
999 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); 999 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller));
1000 dp->irq_trans->irq_build = sbus_of_build_irq; 1000 dp->irq_trans->irq_build = sbus_of_build_irq;
@@ -1080,7 +1080,7 @@ static unsigned int sun4v_vdev_irq_build(struct device_node *dp,
1080 1080
1081static void sun4v_vdev_irq_trans_init(struct device_node *dp) 1081static void sun4v_vdev_irq_trans_init(struct device_node *dp)
1082{ 1082{
1083 struct linux_prom64_registers *regs; 1083 const struct linux_prom64_registers *regs;
1084 1084
1085 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); 1085 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller));
1086 dp->irq_trans->irq_build = sun4v_vdev_irq_build; 1086 dp->irq_trans->irq_build = sun4v_vdev_irq_build;
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c
index 14f78fb5e890..d403f3df2dc2 100644
--- a/arch/sparc64/kernel/sbus.c
+++ b/arch/sparc64/kernel/sbus.c
@@ -1025,7 +1025,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus)
1025/* Boot time initialization. */ 1025/* Boot time initialization. */
1026static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus) 1026static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus)
1027{ 1027{
1028 struct linux_prom64_registers *pr; 1028 const struct linux_prom64_registers *pr;
1029 struct device_node *dp; 1029 struct device_node *dp;
1030 struct sbus_iommu *iommu; 1030 struct sbus_iommu *iommu;
1031 unsigned long regs; 1031 unsigned long regs;
@@ -1133,7 +1133,7 @@ static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus)
1133void sbus_fill_device_irq(struct sbus_dev *sdev) 1133void sbus_fill_device_irq(struct sbus_dev *sdev)
1134{ 1134{
1135 struct device_node *dp = of_find_node_by_phandle(sdev->prom_node); 1135 struct device_node *dp = of_find_node_by_phandle(sdev->prom_node);
1136 struct linux_prom_irqs *irqs; 1136 const struct linux_prom_irqs *irqs;
1137 1137
1138 irqs = of_get_property(dp, "interrupts", NULL); 1138 irqs = of_get_property(dp, "interrupts", NULL);
1139 if (!irqs) { 1139 if (!irqs) {
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 3cb761ec8953..259063f41f95 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -704,7 +704,7 @@ retry:
704 return -EOPNOTSUPP; 704 return -EOPNOTSUPP;
705} 705}
706 706
707static int __init clock_model_matches(char *model) 707static int __init clock_model_matches(const char *model)
708{ 708{
709 if (strcmp(model, "mk48t02") && 709 if (strcmp(model, "mk48t02") &&
710 strcmp(model, "mk48t08") && 710 strcmp(model, "mk48t08") &&
@@ -721,7 +721,7 @@ static int __init clock_model_matches(char *model)
721static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match) 721static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match)
722{ 722{
723 struct device_node *dp = op->node; 723 struct device_node *dp = op->node;
724 char *model = of_get_property(dp, "model", NULL); 724 const char *model = of_get_property(dp, "model", NULL);
725 unsigned long size, flags; 725 unsigned long size, flags;
726 void __iomem *regs; 726 void __iomem *regs;
727 727
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c
index 9fcaad6dd11f..542c808ec2c8 100644
--- a/arch/sparc64/solaris/misc.c
+++ b/arch/sparc64/solaris/misc.c
@@ -224,7 +224,8 @@ static char *serial(char *buffer, int sz)
224 224
225 *buffer = 0; 225 *buffer = 0;
226 if (dp) { 226 if (dp) {
227 char *val = of_get_property(dp, "system-board-serial#", &len); 227 const char *val =
228 of_get_property(dp, "system-board-serial#", &len);
228 229
229 if (val && len > 0) { 230 if (val && len > 0) {
230 if (len > sz) 231 if (len > sz)