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

    ide: skip not present devices in init_gendisk()
    
    No need to initialize drive->gendev and waste memory on IDE settings
    for not present devices.
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-probe.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index f4baedf..4d5291c 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1188,6 +1188,10 @@ static void init_gendisk (ide_hwif_t *hwif)
 
        for (unit = 0; unit < MAX_DRIVES; ++unit) {
                ide_drive_t * drive = &hwif->drives[unit];
+
+               if (!drive->present)
+                       continue;
+
                ide_add_generic_settings(drive);
                snprintf(drive->gendev.bus_id,BUS_ID_SIZE,"%u.%u",
                         hwif->index,unit);
-
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