aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:40 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:40 -0500
commit5c2854e62ce1dfb2cd86968f0d7b0d45e07c14db (patch)
tree0c53ddfc734d73ff2e3027403b6545e59a0cbdd4 /drivers/ide
parent521fd1e8d1d9ee7121e5c792ad4b955043fb5ffd (diff)
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 <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-probe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index f4baedf7d023..4d5291c33fab 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)
1188 1188
1189 for (unit = 0; unit < MAX_DRIVES; ++unit) { 1189 for (unit = 0; unit < MAX_DRIVES; ++unit) {
1190 ide_drive_t * drive = &hwif->drives[unit]; 1190 ide_drive_t * drive = &hwif->drives[unit];
1191
1192 if (!drive->present)
1193 continue;
1194
1191 ide_add_generic_settings(drive); 1195 ide_add_generic_settings(drive);
1192 snprintf(drive->gendev.bus_id,BUS_ID_SIZE,"%u.%u", 1196 snprintf(drive->gendev.bus_id,BUS_ID_SIZE,"%u.%u",
1193 hwif->index,unit); 1197 hwif->index,unit);