diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-22 19:12:03 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-23 23:15:28 -0700 |
commit | 690c8fd31f1e35985d0f35772fde514da59ec9d1 (patch) | |
tree | 8a5a0036b3780a9eb315ea2201a2562570de1ebe /include/asm-sparc64/parport.h | |
parent | de8d28b16f5614aeb12bb69c8f9a38578b8d3ada (diff) | |
download | linux-690c8fd31f1e35985d0f35772fde514da59ec9d1.tar.gz linux-690c8fd31f1e35985d0f35772fde514da59ec9d1.tar.bz2 linux-690c8fd31f1e35985d0f35772fde514da59ec9d1.zip |
[SPARC64]: Use in-kernel PROM tree for EBUS and ISA.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/parport.h')
-rw-r--r-- | include/asm-sparc64/parport.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index 56b5197d7898..d3895873e4c7 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h @@ -67,18 +67,17 @@ static __inline__ unsigned int get_dma_residue(unsigned int dmanr) static int ebus_ecpp_p(struct linux_ebus_device *edev) { - if (!strcmp(edev->prom_name, "ecpp")) + if (!strcmp(edev->prom_node->name, "ecpp")) return 1; - if (!strcmp(edev->prom_name, "parallel")) { - char compat[19]; - prom_getstring(edev->prom_node, - "compatible", - compat, sizeof(compat)); - compat[18] = '\0'; - if (!strcmp(compat, "ecpp")) - return 1; - if (!strcmp(compat, "ns87317-ecpp") && - !strcmp(compat + 13, "ecpp")) + if (!strcmp(edev->prom_node->name, "parallel")) { + char *compat; + + compat = of_get_property(edev->prom_node, + "compatible", NULL); + if (compat && + (!strcmp(compat, "ecpp") || + !strcmp(compat, "ns87317-ecpp") || + !strcmp(compat + 13, "ecpp"))) return 1; } return 0; @@ -94,12 +93,12 @@ static int parport_isa_probe(int count) struct sparc_isa_device *child; unsigned long base; - if (strcmp(isa_dev->prom_name, "dma")) + if (strcmp(isa_dev->prom_node->name, "dma")) continue; child = isa_dev->child; while (child) { - if (!strcmp(child->prom_name, "parallel")) + if (!strcmp(child->prom_node->name, "parallel")) break; child = child->next; } |