diff options
Diffstat (limited to 'arch/powerpc/kernel/btext.c')
-rw-r--r-- | arch/powerpc/kernel/btext.c | 24 |
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) | |||
158 | { | 158 | { |
159 | unsigned int width, height, depth, pitch; | 159 | unsigned int width, height, depth, pitch; |
160 | unsigned long address = 0; | 160 | unsigned long address = 0; |
161 | u32 *prop; | 161 | const u32 *prop; |
162 | 162 | ||
163 | prop = (u32 *)get_property(np, "linux,bootx-width", NULL); | 163 | prop = get_property(np, "linux,bootx-width", NULL); |
164 | if (prop == NULL) | 164 | if (prop == NULL) |
165 | prop = (u32 *)get_property(np, "width", NULL); | 165 | prop = get_property(np, "width", NULL); |
166 | if (prop == NULL) | 166 | if (prop == NULL) |
167 | return -EINVAL; | 167 | return -EINVAL; |
168 | width = *prop; | 168 | width = *prop; |
169 | prop = (u32 *)get_property(np, "linux,bootx-height", NULL); | 169 | prop = get_property(np, "linux,bootx-height", NULL); |
170 | if (prop == NULL) | 170 | if (prop == NULL) |
171 | prop = (u32 *)get_property(np, "height", NULL); | 171 | prop = get_property(np, "height", NULL); |
172 | if (prop == NULL) | 172 | if (prop == NULL) |
173 | return -EINVAL; | 173 | return -EINVAL; |
174 | height = *prop; | 174 | height = *prop; |
175 | prop = (u32 *)get_property(np, "linux,bootx-depth", NULL); | 175 | prop = get_property(np, "linux,bootx-depth", NULL); |
176 | if (prop == NULL) | 176 | if (prop == NULL) |
177 | prop = (u32 *)get_property(np, "depth", NULL); | 177 | prop = get_property(np, "depth", NULL); |
178 | if (prop == NULL) | 178 | if (prop == NULL) |
179 | return -EINVAL; | 179 | return -EINVAL; |
180 | depth = *prop; | 180 | depth = *prop; |
181 | pitch = width * ((depth + 7) / 8); | 181 | pitch = width * ((depth + 7) / 8); |
182 | prop = (u32 *)get_property(np, "linux,bootx-linebytes", NULL); | 182 | prop = get_property(np, "linux,bootx-linebytes", NULL); |
183 | if (prop == NULL) | 183 | if (prop == NULL) |
184 | prop = (u32 *)get_property(np, "linebytes", NULL); | 184 | prop = get_property(np, "linebytes", NULL); |
185 | if (prop) | 185 | if (prop) |
186 | pitch = *prop; | 186 | pitch = *prop; |
187 | if (pitch == 1) | 187 | if (pitch == 1) |
188 | pitch = 0x1000; | 188 | pitch = 0x1000; |
189 | prop = (u32 *)get_property(np, "address", NULL); | 189 | prop = get_property(np, "address", NULL); |
190 | if (prop) | 190 | if (prop) |
191 | address = *prop; | 191 | address = *prop; |
192 | 192 | ||
@@ -214,11 +214,11 @@ int btext_initialize(struct device_node *np) | |||
214 | 214 | ||
215 | int __init btext_find_display(int allow_nonstdout) | 215 | int __init btext_find_display(int allow_nonstdout) |
216 | { | 216 | { |
217 | char *name; | 217 | const char *name; |
218 | struct device_node *np = NULL; | 218 | struct device_node *np = NULL; |
219 | int rc = -ENODEV; | 219 | int rc = -ENODEV; |
220 | 220 | ||
221 | name = (char *)get_property(of_chosen, "linux,stdout-path", NULL); | 221 | name = get_property(of_chosen, "linux,stdout-path", NULL); |
222 | if (name != NULL) { | 222 | if (name != NULL) { |
223 | np = of_find_node_by_path(name); | 223 | np = of_find_node_by_path(name); |
224 | if (np != NULL) { | 224 | if (np != NULL) { |