diff options
Diffstat (limited to 'include/asm-sparc64/floppy.h')
-rw-r--r-- | include/asm-sparc64/floppy.h | 27 |
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) | |||
498 | #ifdef CONFIG_PCI | 498 | #ifdef CONFIG_PCI |
499 | static int __init ebus_fdthree_p(struct linux_ebus_device *edev) | 499 | static int __init ebus_fdthree_p(struct linux_ebus_device *edev) |
500 | { | 500 | { |
501 | if (!strcmp(edev->prom_name, "fdthree")) | 501 | if (!strcmp(edev->prom_node->name, "fdthree")) |
502 | return 1; | 502 | return 1; |
503 | if (!strcmp(edev->prom_name, "floppy")) { | 503 | if (!strcmp(edev->prom_node->name, "floppy")) { |
504 | char compat[16]; | 504 | char *compat; |
505 | prom_getstring(edev->prom_node, | 505 | |
506 | "compatible", | 506 | compat = of_get_property(edev->prom_node, |
507 | compat, sizeof(compat)); | 507 | "compatible", NULL); |
508 | compat[15] = '\0'; | 508 | if (compat && !strcmp(compat, "fdthree")) |
509 | if (!strcmp(compat, "fdthree")) | ||
510 | return 1; | 509 | return 1; |
511 | } | 510 | } |
512 | return 0; | 511 | return 0; |
@@ -524,12 +523,12 @@ static unsigned long __init isa_floppy_init(void) | |||
524 | 523 | ||
525 | for_each_isa(isa_br) { | 524 | for_each_isa(isa_br) { |
526 | for_each_isadev(isa_dev, isa_br) { | 525 | for_each_isadev(isa_dev, isa_br) { |
527 | if (!strcmp(isa_dev->prom_name, "dma")) { | 526 | if (!strcmp(isa_dev->prom_node->name, "dma")) { |
528 | struct sparc_isa_device *child = | 527 | struct sparc_isa_device *child = |
529 | isa_dev->child; | 528 | isa_dev->child; |
530 | 529 | ||
531 | while (child) { | 530 | while (child) { |
532 | if (!strcmp(child->prom_name, | 531 | if (!strcmp(child->prom_node->name, |
533 | "floppy")) { | 532 | "floppy")) { |
534 | isa_dev = child; | 533 | isa_dev = child; |
535 | goto isa_done; | 534 | goto isa_done; |
@@ -614,6 +613,7 @@ static unsigned long __init sun_floppy_init(void) | |||
614 | struct linux_ebus_device *edev = NULL; | 613 | struct linux_ebus_device *edev = NULL; |
615 | unsigned long config = 0; | 614 | unsigned long config = 0; |
616 | void __iomem *auxio_reg; | 615 | void __iomem *auxio_reg; |
616 | char *state_prop; | ||
617 | 617 | ||
618 | for_each_ebus(ebus) { | 618 | for_each_ebus(ebus) { |
619 | for_each_ebusdev(edev, ebus) { | 619 | for_each_ebusdev(edev, ebus) { |
@@ -630,9 +630,8 @@ static unsigned long __init sun_floppy_init(void) | |||
630 | #endif | 630 | #endif |
631 | } | 631 | } |
632 | 632 | ||
633 | prom_getproperty(edev->prom_node, "status", | 633 | state_prop = of_get_property(edev->prom_node, "status", NULL); |
634 | state, sizeof(state)); | 634 | if (state_prop && !strncmp(state_prop, "disabled", 8)) |
635 | if (!strncmp(state, "disabled", 8)) | ||
636 | return 0; | 635 | return 0; |
637 | 636 | ||
638 | FLOPPY_IRQ = edev->irqs[0]; | 637 | FLOPPY_IRQ = edev->irqs[0]; |
@@ -703,7 +702,7 @@ static unsigned long __init sun_floppy_init(void) | |||
703 | */ | 702 | */ |
704 | for_each_ebus(ebus) { | 703 | for_each_ebus(ebus) { |
705 | for_each_ebusdev(edev, ebus) { | 704 | for_each_ebusdev(edev, ebus) { |
706 | if (!strcmp(edev->prom_name, "ecpp")) { | 705 | if (!strcmp(edev->prom_node->name, "ecpp")) { |
707 | config = edev->resource[1].start; | 706 | config = edev->resource[1].start; |
708 | goto config_done; | 707 | goto config_done; |
709 | } | 708 | } |