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:
mav 2012-05-28 14:33:15 +00:00
parent d57cf5a8a0
commit b9ef440fcd

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;