DEVICE_IDENTIFY.9: Fix function call to detect driver in example code

Fixes:          ccabc7c2e5 ("DEVICE_IDENTIFY.9: Modernize description and use cases")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit c78937677c973c48fd438ea06cfb51e11cc62851)
This commit is contained in:
Olivier Certner 2026-03-27 15:46:58 +01:00
parent 806d26e169
commit dafac65367
No known key found for this signature in database
GPG key ID: 8CA13040971E2627

View file

@ -74,7 +74,7 @@ foo_identify(driver_t *driver, device_t parent)
retrieve_device_information;
if (devices matches one of your supported devices &&
device_get_child(parent, "foo", DEVICE_UNIT_ANY) == NULL) {
device_find_child(parent, "foo", DEVICE_UNIT_ANY) == NULL) {
child = BUS_ADD_CHILD(parent, 0, "foo", DEVICE_UNIT_ANY);
bus_set_resource(child, SYS_RES_IOPORT, 0, FOO_IOADDR, 1);
}