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 file changed, 4 insertions(+)

Index: b/drivers/ide/ide-probe.c
===================================================================
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1194,6 +1194,10 @@ static void init_gendisk (ide_hwif_t *hw
 
        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 linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to