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 | 3fd4d205c73951ce6eaaa16fa3158636d1c35a5d (patch) | |
tree | 29a6955c1ea044dfbb06d962d4120afab965944b | |
parent | e7ee1d5abc2fffad16f7b2fb80f5d4e09133cbc1 (diff) |
scc_pata: use ide_find_port()
There should be no functional changes caused by this patch.
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/pci/scc_pata.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index ef07c7a8b97a..80c553faa8ad 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -534,12 +534,8 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev, | |||
534 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | 534 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
535 | int i; | 535 | int i; |
536 | 536 | ||
537 | for (i = 0; i < MAX_HWIFS; i++) { | 537 | hwif = ide_find_port(); |
538 | hwif = &ide_hwifs[i]; | 538 | if (hwif == NULL) { |
539 | if (hwif->chipset == ide_unknown) | ||
540 | break; /* pick an unused entry */ | ||
541 | } | ||
542 | if (i == MAX_HWIFS) { | ||
543 | printk(KERN_ERR "%s: too many IDE interfaces, " | 539 | printk(KERN_ERR "%s: too many IDE interfaces, " |
544 | "no room in table\n", SCC_PATA_NAME); | 540 | "no room in table\n", SCC_PATA_NAME); |
545 | return -ENOMEM; | 541 | return -ENOMEM; |