diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2009-12-11 01:42:17 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2009-12-11 01:42:17 -0500 |
commit | 0f0b56c3f2df4a083fc9e934266e5bab1710e286 (patch) | |
tree | 8e40c58c5eaae83d68eba6c31a93ff9c5414800a /arch/powerpc | |
parent | 83f7a06eb479e2aeb83536e77a2cb14cc2285e32 (diff) |
of/flattree: eliminate cell_t typedef
A cell is firmly established as a u32. No need to do an ugly typedef
to redefine it to cell_t. Eliminate the unnecessary typedef so that
it doesn't have to be added to the of_fdt header file
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 048e3a3e9876..4e3181cded44 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -67,8 +67,6 @@ int __initdata iommu_force_on; | |||
67 | unsigned long tce_alloc_start, tce_alloc_end; | 67 | unsigned long tce_alloc_start, tce_alloc_end; |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | typedef u32 cell_t; | ||
71 | |||
72 | extern rwlock_t devtree_lock; /* temporary while merging */ | 70 | extern rwlock_t devtree_lock; /* temporary while merging */ |
73 | 71 | ||
74 | /* export that to outside world */ | 72 | /* export that to outside world */ |
@@ -441,22 +439,22 @@ static int __init early_init_dt_scan_chosen(unsigned long node, | |||
441 | */ | 439 | */ |
442 | static int __init early_init_dt_scan_drconf_memory(unsigned long node) | 440 | static int __init early_init_dt_scan_drconf_memory(unsigned long node) |
443 | { | 441 | { |
444 | cell_t *dm, *ls, *usm; | 442 | __be32 *dm, *ls, *usm; |
445 | unsigned long l, n, flags; | 443 | unsigned long l, n, flags; |
446 | u64 base, size, lmb_size; | 444 | u64 base, size, lmb_size; |
447 | unsigned int is_kexec_kdump = 0, rngs; | 445 | unsigned int is_kexec_kdump = 0, rngs; |
448 | 446 | ||
449 | ls = of_get_flat_dt_prop(node, "ibm,lmb-size", &l); | 447 | ls = of_get_flat_dt_prop(node, "ibm,lmb-size", &l); |
450 | if (ls == NULL || l < dt_root_size_cells * sizeof(cell_t)) | 448 | if (ls == NULL || l < dt_root_size_cells * sizeof(__be32)) |
451 | return 0; | 449 | return 0; |
452 | lmb_size = dt_mem_next_cell(dt_root_size_cells, &ls); | 450 | lmb_size = dt_mem_next_cell(dt_root_size_cells, &ls); |
453 | 451 | ||
454 | dm = of_get_flat_dt_prop(node, "ibm,dynamic-memory", &l); | 452 | dm = of_get_flat_dt_prop(node, "ibm,dynamic-memory", &l); |
455 | if (dm == NULL || l < sizeof(cell_t)) | 453 | if (dm == NULL || l < sizeof(__be32)) |
456 | return 0; | 454 | return 0; |
457 | 455 | ||
458 | n = *dm++; /* number of entries */ | 456 | n = *dm++; /* number of entries */ |
459 | if (l < (n * (dt_root_addr_cells + 4) + 1) * sizeof(cell_t)) | 457 | if (l < (n * (dt_root_addr_cells + 4) + 1) * sizeof(__be32)) |
460 | return 0; | 458 | return 0; |
461 | 459 | ||
462 | /* check if this is a kexec/kdump kernel. */ | 460 | /* check if this is a kexec/kdump kernel. */ |
@@ -515,7 +513,7 @@ static int __init early_init_dt_scan_memory(unsigned long node, | |||
515 | const char *uname, int depth, void *data) | 513 | const char *uname, int depth, void *data) |
516 | { | 514 | { |
517 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | 515 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); |
518 | cell_t *reg, *endp; | 516 | __be32 *reg, *endp; |
519 | unsigned long l; | 517 | unsigned long l; |
520 | 518 | ||
521 | /* Look for the ibm,dynamic-reconfiguration-memory node */ | 519 | /* Look for the ibm,dynamic-reconfiguration-memory node */ |
@@ -540,7 +538,7 @@ static int __init early_init_dt_scan_memory(unsigned long node, | |||
540 | if (reg == NULL) | 538 | if (reg == NULL) |
541 | return 0; | 539 | return 0; |
542 | 540 | ||
543 | endp = reg + (l / sizeof(cell_t)); | 541 | endp = reg + (l / sizeof(__be32)); |
544 | 542 | ||
545 | DBG("memory scan node %s, reg size %ld, data: %x %x %x %x,\n", | 543 | DBG("memory scan node %s, reg size %ld, data: %x %x %x %x,\n", |
546 | uname, l, reg[0], reg[1], reg[2], reg[3]); | 544 | uname, l, reg[0], reg[1], reg[2], reg[3]); |