From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date: Sat, 26 Apr 2008 15:36:33 +0000 (+0200)
Subject: au1xxx-ide: use ide_find_port()
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f7bada25098e076e83ffcd762e3079c19d40140;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

au1xxx-ide: use ide_find_port()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---

diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 9b628248f2f4..a8cd0035936d 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -599,9 +599,11 @@ static int au_ide_probe(struct device *dev)
 		goto out;
 	}
 
-	/* FIXME:  This might possibly break PCMCIA IDE devices */
-
-	hwif                            = &ide_hwifs[pdev->id];
+	hwif = ide_find_port();
+	if (hwif == NULL) {
+		ret = -ENOENT;
+		goto out;
+	}
 
 	memset(&hw, 0, sizeof(hw));
 	auide_setup_ports(&hw, ahwif);