aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-02 20:58:52 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-12 13:55:18 -0400
commit1a38147ed0737a9c01dbf5f2ca47fd2a0aa5cb55 (patch)
treecd8ace4daea50a2a8c4bc19db156163e9f7aefb3
parent9213feea6e197f8507ec855337798cc3388f5570 (diff)
[POWERPC] Make struct property's value a void *
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c10
-rw-r--r--arch/powerpc/kernel/pci_32.c2
-rw-r--r--arch/powerpc/kernel/prom.c5
-rw-r--r--arch/powerpc/platforms/maple/pci.c2
-rw-r--r--arch/powerpc/platforms/powermac/pci.c2
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_core.c3
-rw-r--r--drivers/macintosh/smu.c2
-rw-r--r--fs/proc/proc_devtree.c2
-rw-r--r--include/asm-powerpc/prom.h2
9 files changed, 15 insertions, 15 deletions
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index a24b09c27718..b975b5b0e3d5 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -294,19 +294,19 @@ static unsigned long htab_base, kernel_end;
294static struct property htab_base_prop = { 294static struct property htab_base_prop = {
295 .name = "linux,htab-base", 295 .name = "linux,htab-base",
296 .length = sizeof(unsigned long), 296 .length = sizeof(unsigned long),
297 .value = (unsigned char *)&htab_base, 297 .value = &htab_base,
298}; 298};
299 299
300static struct property htab_size_prop = { 300static struct property htab_size_prop = {
301 .name = "linux,htab-size", 301 .name = "linux,htab-size",
302 .length = sizeof(unsigned long), 302 .length = sizeof(unsigned long),
303 .value = (unsigned char *)&htab_size_bytes, 303 .value = &htab_size_bytes,
304}; 304};
305 305
306static struct property kernel_end_prop = { 306static struct property kernel_end_prop = {
307 .name = "linux,kernel-end", 307 .name = "linux,kernel-end",
308 .length = sizeof(unsigned long), 308 .length = sizeof(unsigned long),
309 .value = (unsigned char *)&kernel_end, 309 .value = &kernel_end,
310}; 310};
311 311
312static void __init export_htab_values(void) 312static void __init export_htab_values(void)
@@ -335,7 +335,7 @@ static void __init export_htab_values(void)
335static struct property crashk_base_prop = { 335static struct property crashk_base_prop = {
336 .name = "linux,crashkernel-base", 336 .name = "linux,crashkernel-base",
337 .length = sizeof(unsigned long), 337 .length = sizeof(unsigned long),
338 .value = (unsigned char *)&crashk_res.start, 338 .value = &crashk_res.start,
339}; 339};
340 340
341static unsigned long crashk_size; 341static unsigned long crashk_size;
@@ -343,7 +343,7 @@ static unsigned long crashk_size;
343static struct property crashk_size_prop = { 343static struct property crashk_size_prop = {
344 .name = "linux,crashkernel-size", 344 .name = "linux,crashkernel-size",
345 .length = sizeof(unsigned long), 345 .length = sizeof(unsigned long),
346 .value = (unsigned char *)&crashk_size, 346 .value = &crashk_size,
347}; 347};
348 348
349static void __init export_crashk_values(void) 349static void __init export_crashk_values(void)
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index ecc765819305..e99ffe2140bf 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -1012,7 +1012,7 @@ pci_create_OF_bus_map(void)
1012 memset(of_prop, -1, sizeof(struct property) + 256); 1012 memset(of_prop, -1, sizeof(struct property) + 256);
1013 of_prop->name = "pci-OF-bus-map"; 1013 of_prop->name = "pci-OF-bus-map";
1014 of_prop->length = 256; 1014 of_prop->length = 256;
1015 of_prop->value = (unsigned char *)&of_prop[1]; 1015 of_prop->value = &of_prop[1];
1016 prom_add_property(find_path_device("/"), of_prop); 1016 prom_add_property(find_path_device("/"), of_prop);
1017 } 1017 }
1018} 1018}
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 2890ce3d6641..ec6921c54a07 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -390,12 +390,13 @@ static unsigned long __init unflatten_dt_node(unsigned long mem,
390 if (allnextpp) { 390 if (allnextpp) {
391 pp->name = "name"; 391 pp->name = "name";
392 pp->length = sz; 392 pp->length = sz;
393 pp->value = (unsigned char *)(pp + 1); 393 pp->value = pp + 1;
394 *prev_pp = pp; 394 *prev_pp = pp;
395 prev_pp = &pp->next; 395 prev_pp = &pp->next;
396 memcpy(pp->value, ps, sz - 1); 396 memcpy(pp->value, ps, sz - 1);
397 ((char *)pp->value)[sz - 1] = 0; 397 ((char *)pp->value)[sz - 1] = 0;
398 DBG("fixed up name for %s -> %s\n", pathp, pp->value); 398 DBG("fixed up name for %s -> %s\n", pathp,
399 (char *)pp->value);
399 } 400 }
400 } 401 }
401 if (allnextpp) { 402 if (allnextpp) {
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 73c59904697f..ab5a6f12e1f0 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -77,7 +77,7 @@ static void __init fixup_bus_range(struct device_node *bridge)
77 bridge->full_name); 77 bridge->full_name);
78 return; 78 return;
79 } 79 }
80 bus_range = (int *)prop->value; 80 bus_range = prop->value;
81 bus_range[1] = fixup_one_level_bus_range(bridge->child, bus_range[1]); 81 bus_range[1] = fixup_one_level_bus_range(bridge->child, bus_range[1]);
82} 82}
83 83
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index 6fbac308ded6..431a685a15dd 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -100,7 +100,7 @@ static void __init fixup_bus_range(struct device_node *bridge)
100 if (prop == NULL || prop->length < 2 * sizeof(int)) 100 if (prop == NULL || prop->length < 2 * sizeof(int))
101 return; 101 return;
102 102
103 bus_range = (int *)prop->value; 103 bus_range = prop->value;
104 bus_range[1] = fixup_one_level_bus_range(bridge->child, bus_range[1]); 104 bus_range[1] = fixup_one_level_bus_range(bridge->child, bus_range[1]);
105} 105}
106 106
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 7651f278615a..a128553b8413 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -692,8 +692,7 @@ static int pmf_add_functions(struct pmf_device *dev, void *driverdata)
692 name = pp->name + plen; 692 name = pp->name + plen;
693 if (strlen(name) && pp->length >= 12) 693 if (strlen(name) && pp->length >= 12)
694 count += pmf_add_function_prop(dev, driverdata, name, 694 count += pmf_add_function_prop(dev, driverdata, name,
695 (u32 *)pp->value, 695 pp->value, pp->length);
696 pp->length);
697 } 696 }
698 return count; 697 return count;
699} 698}
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 3096836d8bd3..45bb3c1dfeb1 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -952,7 +952,7 @@ static struct smu_sdbp_header *smu_create_sdb_partition(int id)
952 prop->name = ((char *)prop) + tlen - 18; 952 prop->name = ((char *)prop) + tlen - 18;
953 sprintf(prop->name, "sdb-partition-%02x", id); 953 sprintf(prop->name, "sdb-partition-%02x", id);
954 prop->length = len; 954 prop->length = len;
955 prop->value = (unsigned char *)hdr; 955 prop->value = hdr;
956 prop->next = NULL; 956 prop->next = NULL;
957 957
958 /* Read the datablock */ 958 /* Read the datablock */
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index abdf068bc27f..eca471bc8512 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -38,7 +38,7 @@ static int property_read_proc(char *page, char **start, off_t off,
38 n = count; 38 n = count;
39 else 39 else
40 *eof = 1; 40 *eof = 1;
41 memcpy(page, pp->value + off, n); 41 memcpy(page, (char *)pp->value + off, n);
42 *start = page; 42 *start = page;
43 return n; 43 return n;
44} 44}
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index fb068f2eca4a..e73a2b482a15 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -71,7 +71,7 @@ typedef u32 ihandle;
71struct property { 71struct property {
72 char *name; 72 char *name;
73 int length; 73 int length;
74 unsigned char *value; 74 void *value;
75 struct property *next; 75 struct property *next;
76}; 76};
77 77