Commit 7eb32c6d authored by Patrick Mochel's avatar Patrick Mochel

[PATCH] IDE: only register devices that are present

parent d745be1e
......@@ -1005,8 +1005,8 @@ static void init_gendisk (ide_hwif_t *hwif)
"%s","IDE Drive");
disk->disk_dev.parent = &hwif->gendev;
disk->disk_dev.bus = &ide_bus_type;
device_register(&disk->disk_dev);
if (hwif->drives[unit].present)
device_register(&disk->disk_dev);
hwif->drives[unit].disk = disk;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment