Allow autoprobe function to create more than one device.
Implements a similar idea already present in xrt_prober->found
with out_xdevs
for returning more than one device.
While the commit changes many files the important ones are:
-
xrt_prober.h
: Changelelo_dallas_autoprobe
signature. -
p_prober.c
: Implements similar code toadd_from_devices
. -
drivers/
: The rest of the files are just minimal updates for each driver that implements an autoprober.
Some notes:
-
The comment above
target_entry_list
intarget_lists.c
mentions thatfound
can return negative values in case of error, and while negative values are not causing any different behaviors from just returning0
they might in the future. Should I add the same idea forlelo_dallas_autoprober
? Right now it just mentions a return value of 0 or greater. In that case, should this MR propose error codes for the modified drivers as well? Currently, they return0
wherever they returnedNULL
before. -
I added a
@note
to The Fifth Element reference oflelo_dallas_autoprobe
for future readers, but I can remove it if you see fit.