ide: remove unnecessary MAX_HWIFS checks from ide-probe.c

Previous thread: ide: remove CONFIG_BLK_DEV_IDE config option (take 2) by Linux Kernel Mailing List on Monday, October 13, 2008 - 3:26 pm. (1 message)

Next thread: xtensa: remove dead CONFIG_BLK_DEV_IDE code by Linux Kernel Mailing List on Monday, October 13, 2008 - 3:26 pm. (1 message)
From: Linux Kernel Mailing List
Date: Monday, October 13, 2008 - 3:26 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=75d21f...
Commit:     75d21fffd85fdb0a1d7238cf5996022d7bf424dd
Parent:     452a8ed8ce752a423013cfade1bbca5f13fd16eb
Author:     Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
AuthorDate: Mon Oct 13 21:39:33 2008 +0200
Committer:  Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
CommitDate: Mon Oct 13 21:39:33 2008 +0200

    ide: remove unnecessary MAX_HWIFS checks from ide-probe.c
    
    MAX_HWIFS is now always equal to the number of IDE major numbers.
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-probe.c |   25 +++++++++----------------
 1 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 06575a1..237b987 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -847,7 +847,6 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
 	}
 }
 
-#if MAX_HWIFS > 1
 /*
  * save_match() is used to simplify logic in init_irq() below.
  *
@@ -872,7 +871,6 @@ static void save_match(ide_hwif_t *hwif, ide_hwif_t *new, ide_hwif_t **match)
 	if (!m || m->irq != hwif->irq) /* don't undo a prior perfect match */
 		*match = new;
 }
-#endif /* MAX_HWIFS > 1 */
 
 /*
  * init request queue
@@ -1029,7 +1027,7 @@ static int init_irq (ide_hwif_t *hwif)
 
 	mutex_lock(&ide_cfg_mtx);
 	hwif->hwgroup = NULL;
-#if MAX_HWIFS > 1
+
 	/*
 	 * Group up with any other hwifs that share our irq(s).
 	 */
@@ -1054,7 +1052,7 @@ static int init_irq (ide_hwif_t *hwif)
 			}
 		}
 	}
-#endif /* MAX_HWIFS > 1 */
+
 	/*
 	 * If we are still without a hwgroup, then form a new one
 	 */
@@ -1513,19 +1511,14 @@ static int ide_find_port_slot(const struct ide_port_info *d)
 	 * ports 0x1f0/0x170 (the ide0/ide1 defaults).
 	 */
 	mutex_lock(&ide_cfg_mtx);
-	if (MAX_HWIFS == 1) {
-		if (ide_indexes == 0 && i == 0)
-			idx = 1;
+	if (bootable) ...
Previous thread: ide: remove CONFIG_BLK_DEV_IDE config option (take 2) by Linux Kernel Mailing List on Monday, October 13, 2008 - 3:26 pm. (1 message)

Next thread: xtensa: remove dead CONFIG_BLK_DEV_IDE code by Linux Kernel Mailing List on Monday, October 13, 2008 - 3:26 pm. (1 message)