Re: [patch] IDE driver model update

Patrick Mochel
2002-10-07T19:25:33Z

ChangeSet@1.696.19.1, 2002-10-07 09:52:31-07:00, mochel@osdl.org
IDE: only register drives that are present with the driver core.

diff -Nru a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
--- a/drivers/ide/ide-probe.c Mon Oct 7 12:19:16 2002
+++ b/drivers/ide/ide-probe.c Mon Oct 7 12:19:16 2002
@@ -986,8 +986,8 @@
"%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;
}