projects
/
platform
/
kernel
/
kernel-mfld-blackbay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
521fd1e
)
ide: skip not present devices in init_gendisk()
author
Bartlomiej Zolnierkiewicz
<bzolnier@gmail.com>
Sat, 2 Feb 2008 18:56:40 +0000
(19:56 +0100)
committer
Bartlomiej Zolnierkiewicz
<bzolnier@gmail.com>
Sat, 2 Feb 2008 18:56:40 +0000
(19:56 +0100)
No need to initialize drive->gendev and waste memory on IDE settings
for not present devices.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-probe.c
patch
|
blob
|
history
diff --git
a/drivers/ide/ide-probe.c
b/drivers/ide/ide-probe.c
index
f4baedf
..
4d5291c
100644
(file)
--- 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);