diff options
Diffstat (limited to 'arch/sparc/kernel/pci_sabre.c')
-rw-r--r-- | arch/sparc/kernel/pci_sabre.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index 5c3f5ec4cabc..d1840dbdaa2f 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
@@ -452,9 +452,10 @@ static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm, | |||
452 | sabre_scan_bus(pbm, &op->dev); | 452 | sabre_scan_bus(pbm, &op->dev); |
453 | } | 453 | } |
454 | 454 | ||
455 | static int __devinit sabre_probe(struct platform_device *op, | 455 | static const struct of_device_id sabre_match[]; |
456 | const struct of_device_id *match) | 456 | static int __devinit sabre_probe(struct platform_device *op) |
457 | { | 457 | { |
458 | const struct of_device_id *match; | ||
458 | const struct linux_prom64_registers *pr_regs; | 459 | const struct linux_prom64_registers *pr_regs; |
459 | struct device_node *dp = op->dev.of_node; | 460 | struct device_node *dp = op->dev.of_node; |
460 | struct pci_pbm_info *pbm; | 461 | struct pci_pbm_info *pbm; |
@@ -464,7 +465,8 @@ static int __devinit sabre_probe(struct platform_device *op, | |||
464 | const u32 *vdma; | 465 | const u32 *vdma; |
465 | u64 clear_irq; | 466 | u64 clear_irq; |
466 | 467 | ||
467 | hummingbird_p = (match->data != NULL); | 468 | match = of_match_device(sabre_match, &op->dev); |
469 | hummingbird_p = match && (match->data != NULL); | ||
468 | if (!hummingbird_p) { | 470 | if (!hummingbird_p) { |
469 | struct device_node *cpu_dp; | 471 | struct device_node *cpu_dp; |
470 | 472 | ||
@@ -582,7 +584,7 @@ out_err: | |||
582 | return err; | 584 | return err; |
583 | } | 585 | } |
584 | 586 | ||
585 | static struct of_device_id __initdata sabre_match[] = { | 587 | static const struct of_device_id sabre_match[] = { |
586 | { | 588 | { |
587 | .name = "pci", | 589 | .name = "pci", |
588 | .compatible = "pci108e,a001", | 590 | .compatible = "pci108e,a001", |
@@ -595,7 +597,7 @@ static struct of_device_id __initdata sabre_match[] = { | |||
595 | {}, | 597 | {}, |
596 | }; | 598 | }; |
597 | 599 | ||
598 | static struct of_platform_driver sabre_driver = { | 600 | static struct platform_driver sabre_driver = { |
599 | .driver = { | 601 | .driver = { |
600 | .name = DRIVER_NAME, | 602 | .name = DRIVER_NAME, |
601 | .owner = THIS_MODULE, | 603 | .owner = THIS_MODULE, |
@@ -606,7 +608,7 @@ static struct of_platform_driver sabre_driver = { | |||
606 | 608 | ||
607 | static int __init sabre_init(void) | 609 | static int __init sabre_init(void) |
608 | { | 610 | { |
609 | return of_register_platform_driver(&sabre_driver); | 611 | return platform_driver_register(&sabre_driver); |
610 | } | 612 | } |
611 | 613 | ||
612 | subsys_initcall(sabre_init); | 614 | subsys_initcall(sabre_init); |