diff options
Diffstat (limited to 'arch/powerpc/platforms/chrp/setup.c')
| -rw-r--r-- | arch/powerpc/platforms/chrp/setup.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index d6d8ffc0271e..e66644e0fb40 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
| @@ -280,20 +280,14 @@ static __init void chrp_init(void) | |||
| 280 | node = of_find_node_by_path(property); | 280 | node = of_find_node_by_path(property); |
| 281 | if (!node) | 281 | if (!node) |
| 282 | return; | 282 | return; |
| 283 | property = of_get_property(node, "device_type", NULL); | 283 | if (!of_node_is_type(node, "serial")) |
| 284 | if (!property) | ||
| 285 | goto out_put; | ||
| 286 | if (strcmp(property, "serial")) | ||
| 287 | goto out_put; | 284 | goto out_put; |
| 288 | /* | 285 | /* |
| 289 | * The 9pin connector is either /failsafe | 286 | * The 9pin connector is either /failsafe |
| 290 | * or /pci@80000000/isa@C/serial@i2F8 | 287 | * or /pci@80000000/isa@C/serial@i2F8 |
| 291 | * The optional graphics card has also type 'serial' in VGA mode. | 288 | * The optional graphics card has also type 'serial' in VGA mode. |
| 292 | */ | 289 | */ |
| 293 | property = of_get_property(node, "name", NULL); | 290 | if (of_node_name_eq(node, "failsafe") || of_node_name_eq(node, "serial")) |
| 294 | if (!property) | ||
| 295 | goto out_put; | ||
| 296 | if (!strcmp(property, "failsafe") || !strcmp(property, "serial")) | ||
| 297 | add_preferred_console("ttyS", 0, NULL); | 291 | add_preferred_console("ttyS", 0, NULL); |
| 298 | out_put: | 292 | out_put: |
| 299 | of_node_put(node); | 293 | of_node_put(node); |
