diff options
Diffstat (limited to 'drivers/ide/setup-pci.c')
-rw-r--r-- | drivers/ide/setup-pci.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 1c0c5570dec8..b15cad58dc81 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -541,7 +541,6 @@ out: | |||
541 | 541 | ||
542 | int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d) | 542 | int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d) |
543 | { | 543 | { |
544 | struct ide_host *host; | ||
545 | hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL }; | 544 | hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL }; |
546 | int ret; | 545 | int ret; |
547 | 546 | ||
@@ -551,9 +550,7 @@ int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d) | |||
551 | /* FIXME: silent failure can happen */ | 550 | /* FIXME: silent failure can happen */ |
552 | ide_pci_setup_ports(dev, d, ret, &hw[0], &hws[0]); | 551 | ide_pci_setup_ports(dev, d, ret, &hw[0], &hws[0]); |
553 | 552 | ||
554 | host = ide_host_alloc(d, hws); | 553 | ret = ide_host_add(d, hws, NULL); |
555 | if (host) | ||
556 | ide_host_register(host, d, hws); | ||
557 | } | 554 | } |
558 | 555 | ||
559 | return ret; | 556 | return ret; |
@@ -564,7 +561,6 @@ int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2, | |||
564 | const struct ide_port_info *d) | 561 | const struct ide_port_info *d) |
565 | { | 562 | { |
566 | struct pci_dev *pdev[] = { dev1, dev2 }; | 563 | struct pci_dev *pdev[] = { dev1, dev2 }; |
567 | struct ide_host *host; | ||
568 | int ret, i; | 564 | int ret, i; |
569 | hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL }; | 565 | hw_regs_t hw[4], *hws[] = { NULL, NULL, NULL, NULL }; |
570 | 566 | ||
@@ -582,9 +578,7 @@ int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2, | |||
582 | ide_pci_setup_ports(pdev[i], d, ret, &hw[i*2], &hws[i*2]); | 578 | ide_pci_setup_ports(pdev[i], d, ret, &hw[i*2], &hws[i*2]); |
583 | } | 579 | } |
584 | 580 | ||
585 | host = ide_host_alloc(d, hws); | 581 | ret = ide_host_add(d, hws, NULL); |
586 | if (host) | ||
587 | ide_host_register(host, d, hws); | ||
588 | out: | 582 | out: |
589 | return ret; | 583 | return ret; |
590 | } | 584 | } |