aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-03-29 03:49:54 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 04:54:27 -0400
commitccf0dec6fcadb4e1c877b9bafb031a6bdb7112b9 (patch)
tree98617d025f167ad05bb126f0982841ce277ee3af
parent6a23acf3905287eb952a6f1dbbc8fb3e4eeae2f6 (diff)
[SPARC/64] constify of_get_property return: drivers
The only unfortunate bit here is that the name field of struct map_info is not const, so for now we put a cast on the assignment of it. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/mtd/maps/sun_uflash.c4
-rw-r--r--drivers/net/sungem.c2
-rw-r--r--drivers/net/sunhme.c6
-rw-r--r--drivers/net/tg3.c2
-rw-r--r--drivers/net/tulip/tulip_core.c2
-rw-r--r--drivers/sbus/char/envctrl.c8
-rw-r--r--drivers/sbus/char/flash.c2
-rw-r--r--drivers/sbus/char/openprom.c4
-rw-r--r--drivers/sbus/sbus.c4
-rw-r--r--drivers/scsi/qlogicpti.c2
-rw-r--r--drivers/serial/sunsu.c4
-rw-r--r--drivers/video/cg3.c2
12 files changed, 21 insertions, 21 deletions
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
index 4db2055cee31..001af7f7ddda 100644
--- a/drivers/mtd/maps/sun_uflash.c
+++ b/drivers/mtd/maps/sun_uflash.c
@@ -39,7 +39,7 @@ MODULE_VERSION("2.0");
39 39
40static LIST_HEAD(device_list); 40static LIST_HEAD(device_list);
41struct uflash_dev { 41struct uflash_dev {
42 char *name; /* device name */ 42 const char *name; /* device name */
43 struct map_info map; /* mtd map info */ 43 struct map_info map; /* mtd map info */
44 struct mtd_info *mtd; /* mtd info */ 44 struct mtd_info *mtd; /* mtd info */
45}; 45};
@@ -80,7 +80,7 @@ int uflash_devinit(struct linux_ebus_device *edev, struct device_node *dp)
80 80
81 up->name = of_get_property(dp, "model", NULL); 81 up->name = of_get_property(dp, "model", NULL);
82 if (up->name && 0 < strlen(up->name)) 82 if (up->name && 0 < strlen(up->name))
83 up->map.name = up->name; 83 up->map.name = (char *)up->name;
84 84
85 up->map.phys = res->start; 85 up->map.phys = res->start;
86 86
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 08ea61db46fe..bb07b79817f4 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2914,7 +2914,7 @@ static int __devinit gem_get_device_address(struct gem *gp)
2914 int use_idprom = 1; 2914 int use_idprom = 1;
2915 2915
2916 if (pcp != NULL) { 2916 if (pcp != NULL) {
2917 unsigned char *addr; 2917 const unsigned char *addr;
2918 int len; 2918 int len;
2919 2919
2920 addr = of_get_property(pcp->prom_node, "local-mac-address", 2920 addr = of_get_property(pcp->prom_node, "local-mac-address",
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index 192bbc91c731..bee5e5b309b7 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -2704,7 +2704,7 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe
2704 dev->dev_addr[i] = macaddr[i]; 2704 dev->dev_addr[i] = macaddr[i];
2705 macaddr[5]++; 2705 macaddr[5]++;
2706 } else { 2706 } else {
2707 unsigned char *addr; 2707 const unsigned char *addr;
2708 int len; 2708 int len;
2709 2709
2710 addr = of_get_property(dp, "local-mac-address", &len); 2710 addr = of_get_property(dp, "local-mac-address", &len);
@@ -3081,7 +3081,7 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
3081 macaddr[5]++; 3081 macaddr[5]++;
3082 } else { 3082 } else {
3083#ifdef CONFIG_SPARC 3083#ifdef CONFIG_SPARC
3084 unsigned char *addr; 3084 const unsigned char *addr;
3085 int len; 3085 int len;
3086 3086
3087 if (qfe_slot != -1 && 3087 if (qfe_slot != -1 &&
@@ -3300,7 +3300,7 @@ static int __devinit hme_sbus_probe(struct of_device *dev, const struct of_devic
3300{ 3300{
3301 struct sbus_dev *sdev = to_sbus_device(&dev->dev); 3301 struct sbus_dev *sdev = to_sbus_device(&dev->dev);
3302 struct device_node *dp = dev->node; 3302 struct device_node *dp = dev->node;
3303 char *model = of_get_property(dp, "model", NULL); 3303 const char *model = of_get_property(dp, "model", NULL);
3304 int is_qfe = (match->data != NULL); 3304 int is_qfe = (match->data != NULL);
3305 3305
3306 if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe")) 3306 if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe"))
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 256969e1300c..45b4e018b5e0 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -10996,7 +10996,7 @@ static int __devinit tg3_get_macaddr_sparc(struct tg3 *tp)
10996 struct pcidev_cookie *pcp = pdev->sysdata; 10996 struct pcidev_cookie *pcp = pdev->sysdata;
10997 10997
10998 if (pcp != NULL) { 10998 if (pcp != NULL) {
10999 unsigned char *addr; 10999 const unsigned char *addr;
11000 int len; 11000 int len;
11001 11001
11002 addr = of_get_property(pcp->prom_node, "local-mac-address", 11002 addr = of_get_property(pcp->prom_node, "local-mac-address",
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index e3774a522372..03c14181b6bd 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -1544,7 +1544,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
1544 dev->dev_addr[i] = last_phys_addr[i] + 1; 1544 dev->dev_addr[i] = last_phys_addr[i] + 1;
1545#if defined(__sparc__) 1545#if defined(__sparc__)
1546 if (pcp) { 1546 if (pcp) {
1547 unsigned char *addr; 1547 const unsigned char *addr;
1548 int len; 1548 int len;
1549 1549
1550 addr = of_get_property(pcp->prom_node, 1550 addr = of_get_property(pcp->prom_node,
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index 2cea4f5d2084..f2be2ead8742 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -726,7 +726,7 @@ static struct miscdevice envctrl_dev = {
726 * Return: None. 726 * Return: None.
727 */ 727 */
728static void envctrl_set_mon(struct i2c_child_t *pchild, 728static void envctrl_set_mon(struct i2c_child_t *pchild,
729 char *chnl_desc, 729 const char *chnl_desc,
730 int chnl_no) 730 int chnl_no)
731{ 731{
732 /* Firmware only has temperature type. It does not distinguish 732 /* Firmware only has temperature type. It does not distinguish
@@ -763,8 +763,8 @@ static void envctrl_set_mon(struct i2c_child_t *pchild,
763static void envctrl_init_adc(struct i2c_child_t *pchild, struct device_node *dp) 763static void envctrl_init_adc(struct i2c_child_t *pchild, struct device_node *dp)
764{ 764{
765 int i = 0, len; 765 int i = 0, len;
766 char *pos; 766 const char *pos;
767 unsigned int *pval; 767 const unsigned int *pval;
768 768
769 /* Firmware describe channels into a stream separated by a '\0'. */ 769 /* Firmware describe channels into a stream separated by a '\0'. */
770 pos = of_get_property(dp, "channels-description", &len); 770 pos = of_get_property(dp, "channels-description", &len);
@@ -859,7 +859,7 @@ static void envctrl_init_i2c_child(struct linux_ebus_child *edev_child,
859{ 859{
860 int len, i, tbls_size = 0; 860 int len, i, tbls_size = 0;
861 struct device_node *dp = edev_child->prom_node; 861 struct device_node *dp = edev_child->prom_node;
862 void *pval; 862 const void *pval;
863 863
864 /* Get device address. */ 864 /* Get device address. */
865 pval = of_get_property(dp, "reg", &len); 865 pval = of_get_property(dp, "reg", &len);
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 6e99507aeb12..262f01e68592 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -190,7 +190,7 @@ static int __init flash_init(void)
190 } 190 }
191 if (!sdev) { 191 if (!sdev) {
192#ifdef CONFIG_PCI 192#ifdef CONFIG_PCI
193 struct linux_prom_registers *ebus_regs; 193 const struct linux_prom_registers *ebus_regs;
194 194
195 for_each_ebus(ebus) { 195 for_each_ebus(ebus) {
196 for_each_ebusdev(edev, ebus) { 196 for_each_ebusdev(edev, ebus) {
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index 5041c9dfbe3b..aec3b9f991f6 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -141,7 +141,7 @@ static int copyout(void __user *info, struct openpromio *opp, int len)
141 141
142static int opromgetprop(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize) 142static int opromgetprop(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize)
143{ 143{
144 void *pval; 144 const void *pval;
145 int len; 145 int len;
146 146
147 if (!dp || 147 if (!dp ||
@@ -410,7 +410,7 @@ static int opiocget(void __user *argp, DATA *data)
410 struct opiocdesc op; 410 struct opiocdesc op;
411 struct device_node *dp; 411 struct device_node *dp;
412 char *str; 412 char *str;
413 void *pval; 413 const void *pval;
414 int err, len; 414 int err, len;
415 415
416 if (copy_from_user(&op, argp, sizeof(op))) 416 if (copy_from_user(&op, argp, sizeof(op)))
diff --git a/drivers/sbus/sbus.c b/drivers/sbus/sbus.c
index 6349dd617f85..eee590a51d8a 100644
--- a/drivers/sbus/sbus.c
+++ b/drivers/sbus/sbus.c
@@ -35,7 +35,7 @@ struct sbus_bus *sbus_root;
35static void __init fill_sbus_device(struct device_node *dp, struct sbus_dev *sdev) 35static void __init fill_sbus_device(struct device_node *dp, struct sbus_dev *sdev)
36{ 36{
37 unsigned long base; 37 unsigned long base;
38 void *pval; 38 const void *pval;
39 int len, err; 39 int len, err;
40 40
41 sdev->prom_node = dp->node; 41 sdev->prom_node = dp->node;
@@ -86,7 +86,7 @@ static void __init fill_sbus_device(struct device_node *dp, struct sbus_dev *sde
86 86
87static void __init sbus_bus_ranges_init(struct device_node *dp, struct sbus_bus *sbus) 87static void __init sbus_bus_ranges_init(struct device_node *dp, struct sbus_bus *sbus)
88{ 88{
89 void *pval; 89 const void *pval;
90 int len; 90 int len;
91 91
92 pval = of_get_property(dp, "ranges", &len); 92 pval = of_get_property(dp, "ranges", &len);
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 9f10689905a8..c4195ea869e9 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1403,7 +1403,7 @@ static int __devinit qpti_sbus_probe(struct of_device *dev, const struct of_devi
1403 struct scsi_host_template *tpnt = match->data; 1403 struct scsi_host_template *tpnt = match->data;
1404 struct Scsi_Host *host; 1404 struct Scsi_Host *host;
1405 struct qlogicpti *qpti; 1405 struct qlogicpti *qpti;
1406 char *fcode; 1406 const char *fcode;
1407 1407
1408 /* Sometimes Antares cards come up not completely 1408 /* Sometimes Antares cards come up not completely
1409 * setup, and we get a report of a zero IRQ. 1409 * setup, and we get a report of a zero IRQ.
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 96a852aa1903..bfd44177a215 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1387,8 +1387,8 @@ static enum su_type __devinit su_get_type(struct device_node *dp)
1387 struct device_node *ap = of_find_node_by_path("/aliases"); 1387 struct device_node *ap = of_find_node_by_path("/aliases");
1388 1388
1389 if (ap) { 1389 if (ap) {
1390 char *keyb = of_get_property(ap, "keyboard", NULL); 1390 const char *keyb = of_get_property(ap, "keyboard", NULL);
1391 char *ms = of_get_property(ap, "mouse", NULL); 1391 const char *ms = of_get_property(ap, "mouse", NULL);
1392 1392
1393 if (keyb) { 1393 if (keyb) {
1394 if (dp == of_find_node_by_path(keyb)) 1394 if (dp == of_find_node_by_path(keyb))
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c
index 767c850f8eb7..f042428a84f4 100644
--- a/drivers/video/cg3.c
+++ b/drivers/video/cg3.c
@@ -266,7 +266,7 @@ static void __devinit cg3_init_fix(struct fb_info *info, int linebytes,
266static void __devinit cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var, 266static void __devinit cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var,
267 struct device_node *dp) 267 struct device_node *dp)
268{ 268{
269 char *params; 269 const char *params;
270 char *p; 270 char *p;
271 int ww, hh; 271 int ww, hh;
272 272