aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/offb.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-07-12 01:40:40 -0400
committerPaul Mackerras <paulus@samba.org>2006-07-31 01:55:05 -0400
commitb04e3dd4ab4c7763a4ca8f751caaf69ce8dabbba (patch)
tree0224891d9ea4bfa4b1b8245d498cf2fa81737884 /drivers/video/offb.c
parent018a3d1db7cdb6127656c1622ee1d2302e16436d (diff)
[POWERPC] video & agp: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc-specific video & agp driver changes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/video/offb.c')
-rw-r--r--drivers/video/offb.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/video/offb.c b/drivers/video/offb.c
index faba67228526..0e750a8510fc 100644
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -410,30 +410,30 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
410 unsigned int flags, rsize, addr_prop = 0; 410 unsigned int flags, rsize, addr_prop = 0;
411 unsigned long max_size = 0; 411 unsigned long max_size = 0;
412 u64 rstart, address = OF_BAD_ADDR; 412 u64 rstart, address = OF_BAD_ADDR;
413 u32 *pp, *addrp, *up; 413 const u32 *pp, *addrp, *up;
414 u64 asize; 414 u64 asize;
415 415
416 pp = (u32 *)get_property(dp, "linux,bootx-depth", &len); 416 pp = get_property(dp, "linux,bootx-depth", &len);
417 if (pp == NULL) 417 if (pp == NULL)
418 pp = (u32 *)get_property(dp, "depth", &len); 418 pp = get_property(dp, "depth", &len);
419 if (pp && len == sizeof(u32)) 419 if (pp && len == sizeof(u32))
420 depth = *pp; 420 depth = *pp;
421 421
422 pp = (u32 *)get_property(dp, "linux,bootx-width", &len); 422 pp = get_property(dp, "linux,bootx-width", &len);
423 if (pp == NULL) 423 if (pp == NULL)
424 pp = (u32 *)get_property(dp, "width", &len); 424 pp = get_property(dp, "width", &len);
425 if (pp && len == sizeof(u32)) 425 if (pp && len == sizeof(u32))
426 width = *pp; 426 width = *pp;
427 427
428 pp = (u32 *)get_property(dp, "linux,bootx-height", &len); 428 pp = get_property(dp, "linux,bootx-height", &len);
429 if (pp == NULL) 429 if (pp == NULL)
430 pp = (u32 *)get_property(dp, "height", &len); 430 pp = get_property(dp, "height", &len);
431 if (pp && len == sizeof(u32)) 431 if (pp && len == sizeof(u32))
432 height = *pp; 432 height = *pp;
433 433
434 pp = (u32 *)get_property(dp, "linux,bootx-linebytes", &len); 434 pp = get_property(dp, "linux,bootx-linebytes", &len);
435 if (pp == NULL) 435 if (pp == NULL)
436 pp = (u32 *)get_property(dp, "linebytes", &len); 436 pp = get_property(dp, "linebytes", &len);
437 if (pp && len == sizeof(u32)) 437 if (pp && len == sizeof(u32))
438 pitch = *pp; 438 pitch = *pp;
439 else 439 else
@@ -451,9 +451,9 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
451 * ranges and pick one that is both big enough and if possible encloses 451 * ranges and pick one that is both big enough and if possible encloses
452 * the "address" property. If none match, we pick the biggest 452 * the "address" property. If none match, we pick the biggest
453 */ 453 */
454 up = (u32 *)get_property(dp, "linux,bootx-addr", &len); 454 up = get_property(dp, "linux,bootx-addr", &len);
455 if (up == NULL) 455 if (up == NULL)
456 up = (u32 *)get_property(dp, "address", &len); 456 up = get_property(dp, "address", &len);
457 if (up && len == sizeof(u32)) 457 if (up && len == sizeof(u32))
458 addr_prop = *up; 458 addr_prop = *up;
459 459