Use devclass_find_free_unit() in ata_pci_add_child() because no more
implicit auto-scanning up present in device_add_child(). Functionally it is fully equivalent to old code.
This commit is contained in:
parent
10fda3c335
commit
980016100e
@ -271,7 +271,8 @@ ata_pci_add_child(device_t dev, int unit)
|
|||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!(child = device_add_child(dev, "ata", 2)))
|
if (!(child = device_add_child(dev, "ata",
|
||||||
|
devclass_find_free_unit(devclass_find("ata"), 2))))
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user