linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] sgiioc4: use ide_find_port()
@ 2008-02-16 20:26 Bartlomiej Zolnierkiewicz
  2008-02-16 20:26 ` [PATCH 2/9] au1xxx-ide: " Bartlomiej Zolnierkiewicz
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-16 20:26 UTC (permalink / raw)
  To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/pci/sgiioc4.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

Index: b/drivers/ide/pci/sgiioc4.c
===================================================================
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -591,20 +591,12 @@ sgiioc4_ide_setup_pci_device(struct pci_
 	unsigned long bar0, cmd_phys_base, ctl;
 	void __iomem *virt_base;
 	ide_hwif_t *hwif;
-	int h;
 	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
 	hw_regs_t hw;
 	struct ide_port_info d = sgiioc4_port_info;
 
-	/*
-	 * Find an empty HWIF; if none available, return -ENOMEM.
-	 */
-	for (h = 0; h < MAX_HWIFS; ++h) {
-		hwif = &ide_hwifs[h];
-		if (hwif->chipset == ide_unknown)
-			break;
-	}
-	if (h == MAX_HWIFS) {
+	hwif = ide_find_port();
+	if (hwif == NULL) {
 		printk(KERN_ERR "%s: too many IDE interfaces, no room in table\n",
 				DRV_NAME);
 		return -ENOMEM;

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-02-18 16:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16 20:26 [PATCH 1/9] sgiioc4: use ide_find_port() Bartlomiej Zolnierkiewicz
2008-02-16 20:26 ` [PATCH 2/9] au1xxx-ide: " Bartlomiej Zolnierkiewicz
2008-02-16 20:26 ` [PATCH 3/9] cmd640: remove cmd_drives[] Bartlomiej Zolnierkiewicz
2008-02-16 20:26 ` [PATCH 4/9] cmd640: use ide_find_port() Bartlomiej Zolnierkiewicz
2008-02-16 20:27 ` [PATCH 5/9] scc_pata: store 'hwif' pointer in struct scc_ports Bartlomiej Zolnierkiewicz
2008-02-16 20:27 ` [PATCH 6/9] umc8672: don't use ide_hwifs[] in umc_set_pio_mode() Bartlomiej Zolnierkiewicz
2008-02-16 20:27 ` [PATCH 7/9] ht6560b: use driver name for resource allocation Bartlomiej Zolnierkiewicz
2008-02-18 15:24   ` Sergei Shtylyov
2008-02-16 20:27 ` [PATCH 8/9] qd65xx: return error value in qd_probe() Bartlomiej Zolnierkiewicz
2008-02-18 17:00   ` Sergei Shtylyov
2008-02-16 20:27 ` [PATCH 9/9] ide: IDE_HFLAG_BOOTABLE -> IDE_HFLAG_NON_BOOTABLE Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).