a/util: Fix function signature for u_builder_find_prober_device

Was this ever working?
This commit is contained in:
Moses Turner 2022-05-25 21:41:36 +01:00 committed by Jakob Bornecrantz
parent bbd6475da0
commit 5652ddd718
3 changed files with 11 additions and 5 deletions

View file

@ -20,12 +20,15 @@
struct xrt_prober_device *
u_builder_find_prober_device(struct xrt_prober_device *const *xpdevs,
size_t xpdev_count,
uint16_t vendor_id,
uint16_t product_id,
uint16_t vendor_id)
enum xrt_bus_type bus_type)
{
for (size_t i = 0; i < xpdev_count; i++) {
struct xrt_prober_device *xpdev = xpdevs[i];
if (xpdev->product_id != product_id || xpdev->vendor_id != vendor_id) {
if (xpdev->product_id != product_id || //
xpdev->vendor_id != vendor_id || //
xpdev->bus != bus_type) {
continue;
}

View file

@ -59,8 +59,9 @@ struct u_builder_search_results
struct xrt_prober_device *
u_builder_find_prober_device(struct xrt_prober_device *const *xpdevs,
size_t xpdev_count,
uint16_t vendor_id,
uint16_t product_id,
uint16_t vendor_id);
enum xrt_bus_type bus_type);
/*!
* Find all of the @ref xrt_prober_device that matches any in the given list of

View file

@ -230,7 +230,8 @@ rgb_estimate_system(struct xrt_builder *xb, cJSON *config, struct xrt_prober *xp
*/
#ifdef XRT_BUILD_DRIVER_PSVR
struct xrt_prober_device *psvr = u_builder_find_prober_device(xpdevs, xpdev_count, PSVR_VID, PSVR_PID);
struct xrt_prober_device *psvr =
u_builder_find_prober_device(xpdevs, xpdev_count, PSVR_VID, PSVR_PID, XRT_BUS_TYPE_USB);
if (psvr != NULL) {
estimate->certain.head = true;
}
@ -322,7 +323,8 @@ rgb_open_system(struct xrt_builder *xb, cJSON *config, struct xrt_prober *xp, st
struct xrt_device *psmv_purple = NULL;
#ifdef XRT_BUILD_DRIVER_PSVR
struct xrt_prober_device *psvr = u_builder_find_prober_device(xpdevs, xpdev_count, PSVR_VID, PSVR_PID);
struct xrt_prober_device *psvr =
u_builder_find_prober_device(xpdevs, xpdev_count, PSVR_VID, PSVR_PID, XRT_BUS_TYPE_USB);
if (psvr != NULL) {
head = psvr_device_create(build.psvr);
}