summaryrefslogtreecommitdiff
path: root/include/asm-sparc64/floppy.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-06-22 19:12:03 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-23 23:15:28 -0700
commit690c8fd31f1e35985d0f35772fde514da59ec9d1 (patch)
tree8a5a0036b3780a9eb315ea2201a2562570de1ebe /include/asm-sparc64/floppy.h
parentde8d28b16f5614aeb12bb69c8f9a38578b8d3ada (diff)
[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/floppy.h')
-rw-r--r--include/asm-sparc64/floppy.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h
index 07ccd6f04b52..f8d57bb5570c 100644
--- a/include/asm-sparc64/floppy.h
+++ b/include/asm-sparc64/floppy.h
@@ -498,15 +498,14 @@ static int sun_pci_fd_test_drive(unsigned long port, int drive)
#ifdef CONFIG_PCI
static int __init ebus_fdthree_p(struct linux_ebus_device *edev)
{
- if (!strcmp(edev->prom_name, "fdthree"))
+ if (!strcmp(edev->prom_node->name, "fdthree"))
return 1;
- if (!strcmp(edev->prom_name, "floppy")) {
- char compat[16];
- prom_getstring(edev->prom_node,
- "compatible",
- compat, sizeof(compat));
- compat[15] = '\0';
- if (!strcmp(compat, "fdthree"))
+ if (!strcmp(edev->prom_node->name, "floppy")) {
+ char *compat;
+
+ compat = of_get_property(edev->prom_node,
+ "compatible", NULL);
+ if (compat && !strcmp(compat, "fdthree"))
return 1;
}
return 0;
@@ -524,12 +523,12 @@ static unsigned long __init isa_floppy_init(void)
for_each_isa(isa_br) {
for_each_isadev(isa_dev, isa_br) {
- if (!strcmp(isa_dev->prom_name, "dma")) {
+ if (!strcmp(isa_dev->prom_node->name, "dma")) {
struct sparc_isa_device *child =
isa_dev->child;
while (child) {
- if (!strcmp(child->prom_name,
+ if (!strcmp(child->prom_node->name,
"floppy")) {
isa_dev = child;
goto isa_done;
@@ -614,6 +613,7 @@ static unsigned long __init sun_floppy_init(void)
struct linux_ebus_device *edev = NULL;
unsigned long config = 0;
void __iomem *auxio_reg;
+ char *state_prop;
for_each_ebus(ebus) {
for_each_ebusdev(edev, ebus) {
@@ -630,9 +630,8 @@ static unsigned long __init sun_floppy_init(void)
#endif
}
- prom_getproperty(edev->prom_node, "status",
- state, sizeof(state));
- if (!strncmp(state, "disabled", 8))
+ state_prop = of_get_property(edev->prom_node, "status", NULL);
+ if (state_prop && !strncmp(state_prop, "disabled", 8))
return 0;
FLOPPY_IRQ = edev->irqs[0];
@@ -703,7 +702,7 @@ static unsigned long __init sun_floppy_init(void)
*/
for_each_ebus(ebus) {
for_each_ebusdev(edev, ebus) {
- if (!strcmp(edev->prom_name, "ecpp")) {
+ if (!strcmp(edev->prom_node->name, "ecpp")) {
config = edev->resource[1].start;
goto config_done;
}