Make legacy ATA to not call device_add_child() with unit number but

without driver name. This fixed legacy ATA breakage by r235978.

MFC after:	1 week
This commit is contained in:
Alexander Motin 2012-05-28 14:33:15 +00:00
parent 46932515ac
commit 4cfe4ccf16

View File

@ -887,7 +887,7 @@ ata_add_child(device_t parent, struct ata_device *atadev, int unit)
{
device_t child;
if ((child = device_add_child(parent, NULL, unit))) {
if ((child = device_add_child(parent, (unit < 0) ? NULL : "ad", unit))) {
device_set_softc(child, atadev);
device_quiet(child);
atadev->dev = child;