summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/btext.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-07-12 15:35:54 +1000
committerPaul Mackerras <paulus@samba.org>2006-07-31 15:55:04 +1000
commita7f67bdf2c9f24509b8e81e0f35573b611987c80 (patch)
tree201662dd6504418ef3c84cfe1f280153a4d8cb29 /arch/powerpc/kernel/btext.c
parent4288b92b9644fdb4c6168273873fe08f32090d7a (diff)
[POWERPC] 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 core changes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/btext.c')
-rw-r--r--arch/powerpc/kernel/btext.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index f4e5e14ee2b6..995fcef156fd 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -158,35 +158,35 @@ int btext_initialize(struct device_node *np)
{
unsigned int width, height, depth, pitch;
unsigned long address = 0;
- u32 *prop;
+ const u32 *prop;
- prop = (u32 *)get_property(np, "linux,bootx-width", NULL);
+ prop = get_property(np, "linux,bootx-width", NULL);
if (prop == NULL)
- prop = (u32 *)get_property(np, "width", NULL);
+ prop = get_property(np, "width", NULL);
if (prop == NULL)
return -EINVAL;
width = *prop;
- prop = (u32 *)get_property(np, "linux,bootx-height", NULL);
+ prop = get_property(np, "linux,bootx-height", NULL);
if (prop == NULL)
- prop = (u32 *)get_property(np, "height", NULL);
+ prop = get_property(np, "height", NULL);
if (prop == NULL)
return -EINVAL;
height = *prop;
- prop = (u32 *)get_property(np, "linux,bootx-depth", NULL);
+ prop = get_property(np, "linux,bootx-depth", NULL);
if (prop == NULL)
- prop = (u32 *)get_property(np, "depth", NULL);
+ prop = get_property(np, "depth", NULL);
if (prop == NULL)
return -EINVAL;
depth = *prop;
pitch = width * ((depth + 7) / 8);
- prop = (u32 *)get_property(np, "linux,bootx-linebytes", NULL);
+ prop = get_property(np, "linux,bootx-linebytes", NULL);
if (prop == NULL)
- prop = (u32 *)get_property(np, "linebytes", NULL);
+ prop = get_property(np, "linebytes", NULL);
if (prop)
pitch = *prop;
if (pitch == 1)
pitch = 0x1000;
- prop = (u32 *)get_property(np, "address", NULL);
+ prop = get_property(np, "address", NULL);
if (prop)
address = *prop;
@@ -214,11 +214,11 @@ int btext_initialize(struct device_node *np)
int __init btext_find_display(int allow_nonstdout)
{
- char *name;
+ const char *name;
struct device_node *np = NULL;
int rc = -ENODEV;
- name = (char *)get_property(of_chosen, "linux,stdout-path", NULL);
+ name = get_property(of_chosen, "linux,stdout-path", NULL);
if (name != NULL) {
np = of_find_node_by_path(name);
if (np != NULL) {