Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=327617e1da15c3f04bfc50018b0319bd40849022
Commit:     327617e1da15c3f04bfc50018b0319bd40849022
Parent:     eafd88a3b5d86ba2dd515d430b57a01349d0867b
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 2 19:56:43 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Feb 2 19:56:43 2008 +0100

    ide: move hwif->present check out from ide_proc_register_port()
    
    Move hwif->present check out from ide_proc_register_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 |    9 +++++++--
 drivers/ide/ide-proc.c  |    3 ---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index abb695a..1ef2937 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1448,8 +1448,13 @@ int ide_device_add_all(u8 *idx, const struct 
ide_port_info *d)
        }
 
        for (i = 0; i < MAX_HWIFS; i++) {
-               if (idx[i] != 0xff)
-                       ide_proc_register_port(&ide_hwifs[idx[i]]);
+               if (idx[i] == 0xff)
+                       continue;
+
+               hwif = &ide_hwifs[idx[i]];
+
+               if (hwif->present)
+                       ide_proc_register_port(hwif);
        }
 
        return rc;
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 00c249c..c6ed84b 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -793,9 +793,6 @@ static ide_proc_entry_t hwif_entries[] = {
 
 void ide_proc_register_port(ide_hwif_t *hwif)
 {
-       if (!hwif->present)
-               return;
-
        if (!hwif->proc) {
                hwif->proc = proc_mkdir(hwif->name, proc_ide_root);
 
-
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