Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e84e7ea7c4d0a6d7fbaecab2d85df0298cd9e3b4
Commit:     e84e7ea7c4d0a6d7fbaecab2d85df0298cd9e3b4
Parent:     139ddfcab50e5eabcc88341c8743a990ac1be6a2
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 1 23:09:36 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 23:09:36 2008 +0100

    ide: factor out code for tuning devices from ide_probe_port()
    
    * Factor out code for tuning devices from ide_probe_port()
      to ide_port_tune_devices().
    
    * Move ide_port_tune_devices() call from ide_probe_port()
      to ide_device_add_all().
    
    There should be no functionality changes caused by this patch.
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-probe.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 7203d0e..298f398 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -794,6 +794,13 @@ static int ide_probe_port(ide_hwif_t *hwif)
        if (!hwif->present)
                return -ENODEV;
 
+       return 0;
+}
+
+static void ide_port_tune_devices(ide_hwif_t *hwif)
+{
+       int unit;
+
        for (unit = 0; unit < MAX_DRIVES; unit++) {
                ide_drive_t *drive = &hwif->drives[unit];
 
@@ -827,8 +834,6 @@ static int ide_probe_port(ide_hwif_t *hwif)
                else
                        drive->no_io_32bit = drive->id->dword_io ? 1 : 0;
        }
-
-       return 0;
 }
 
 #if MAX_HWIFS > 1
@@ -1309,8 +1314,12 @@ int ide_device_add_all(u8 *idx)
                        continue;
                }
 
-               if (ide_probe_port(hwif) < 0)
+               if (ide_probe_port(hwif) < 0) {
                        ide_hwif_release_regions(hwif);
+                       continue;
+               }
+
+               ide_port_tune_devices(hwif);
        }
 
        for (i = 0; i < MAX_HWIFS; i++) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to