diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 11:36:33 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 11:36:33 -0400 |
commit | e7ee1d5abc2fffad16f7b2fb80f5d4e09133cbc1 (patch) | |
tree | dbadfdaa743320f4b42f400eb6445e5a774cfb4f /drivers/ide/pci | |
parent | 939b0f1d32c0d5fb68531ced559598df211bc323 (diff) |
sgiioc4: use ide_find_port()
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 9d1a3038af9b..6bd9523cf642 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -590,20 +590,12 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
590 | unsigned long bar0, cmd_phys_base, ctl; | 590 | unsigned long bar0, cmd_phys_base, ctl; |
591 | void __iomem *virt_base; | 591 | void __iomem *virt_base; |
592 | ide_hwif_t *hwif; | 592 | ide_hwif_t *hwif; |
593 | int h; | ||
594 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | 593 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
595 | hw_regs_t hw; | 594 | hw_regs_t hw; |
596 | struct ide_port_info d = sgiioc4_port_info; | 595 | struct ide_port_info d = sgiioc4_port_info; |
597 | 596 | ||
598 | /* | 597 | hwif = ide_find_port(); |
599 | * Find an empty HWIF; if none available, return -ENOMEM. | 598 | if (hwif == NULL) { |
600 | */ | ||
601 | for (h = 0; h < MAX_HWIFS; ++h) { | ||
602 | hwif = &ide_hwifs[h]; | ||
603 | if (hwif->chipset == ide_unknown) | ||
604 | break; | ||
605 | } | ||
606 | if (h == MAX_HWIFS) { | ||
607 | printk(KERN_ERR "%s: too many IDE interfaces, no room in table\n", | 599 | printk(KERN_ERR "%s: too many IDE interfaces, no room in table\n", |
608 | DRV_NAME); | 600 | DRV_NAME); |
609 | return -ENOMEM; | 601 | return -ENOMEM; |