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
3eadb99fd7
commit
f21d113aa0
@ -271,7 +271,8 @@ ata_pci_add_child(device_t dev, int unit)
|
||||
return ENOMEM;
|
||||
}
|
||||
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 0;
|
||||
|
Loading…
Reference in New Issue
Block a user