aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-11-01 05:21:49 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-11-01 05:21:49 +0000
commitf21d113aa05f89b914494c6539abe84cd0de30f0 (patch)
tree9d6069637ae7da8f2e625eb856f31e58f31fd56e /sys/dev
parent3eadb99fd704b907cf4c2ab7d9625f87cc974518 (diff)
downloadsrc-f21d113aa05f89b914494c6539abe84cd0de30f0.tar.gz
src-f21d113aa05f89b914494c6539abe84cd0de30f0.zip
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.
Notes
Notes: svn path=/head/; revision=85802
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index 4e12bc8df827..db6f97dfe0db 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -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;