From: Bartlomiej Zolnierkiewicz Date: Sat, 26 Apr 2008 15:36:33 +0000 (+0200) Subject: scc_pata: use ide_find_port() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3fd4d205c73951ce6eaaa16fa3158636d1c35a5d;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git scc_pata: use ide_find_port() There should be no functional changes caused by this patch. Cc: Kou Ishizaki Cc: Akira Iguchi Cc: Stephen Rothwell Signed-off-by: Bartlomiej Zolnierkiewicz --- 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, u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; int i; - for (i = 0; i < MAX_HWIFS; i++) { - hwif = &ide_hwifs[i]; - if (hwif->chipset == ide_unknown) - break; /* pick an unused entry */ - } - if (i == MAX_HWIFS) { + hwif = ide_find_port(); + if (hwif == NULL) { printk(KERN_ERR "%s: too many IDE interfaces, " "no room in table\n", SCC_PATA_NAME); return -ENOMEM;