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>
This commit is contained in:
parent
e7ee1d5abc
commit
3fd4d205c7
|
@ -534,12 +534,8 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev,
|
||||||
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
|
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MAX_HWIFS; i++) {
|
hwif = ide_find_port();
|
||||||
hwif = &ide_hwifs[i];
|
if (hwif == NULL) {
|
||||||
if (hwif->chipset == ide_unknown)
|
|
||||||
break; /* pick an unused entry */
|
|
||||||
}
|
|
||||||
if (i == MAX_HWIFS) {
|
|
||||||
printk(KERN_ERR "%s: too many IDE interfaces, "
|
printk(KERN_ERR "%s: too many IDE interfaces, "
|
||||||
"no room in table\n", SCC_PATA_NAME);
|
"no room in table\n", SCC_PATA_NAME);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Reference in New Issue