xrt: Remove functions now living in helper code

This commit is contained in:
Jakob Bornecrantz 2022-05-11 13:32:20 +01:00 committed by Jakob Bornecrantz
parent a38ea4231c
commit 126dbb540f
2 changed files with 0 additions and 54 deletions

View file

@ -152,12 +152,6 @@ enum xrt_prober_string
XRT_PROBER_STRING_SERIAL_NUMBER,
};
const char *
xrt_prober_string_to_string(enum xrt_prober_string t);
const char *
xrt_bus_type_to_string(enum xrt_bus_type t);
/*!
* A probed device, may or may not be opened.
*
@ -473,14 +467,6 @@ xrt_prober_destroy(struct xrt_prober **xp_ptr)
int
xrt_prober_create_with_lists(struct xrt_prober **out_xp, struct xrt_prober_entry_lists *list);
/*!
* @public @memberof xrt_prober
*/
bool
xrt_prober_match_string(struct xrt_prober *xp,
struct xrt_prober_device *dev,
enum xrt_prober_string type,
const char *to_match);
/*
*

View file

@ -144,46 +144,6 @@ xrt_prober_create_with_lists(struct xrt_prober **out_xp, struct xrt_prober_entry
return 0;
}
#define ENUM_TO_STR(r) \
case r: return #r
const char *
xrt_prober_string_to_string(enum xrt_prober_string t)
{
switch (t) {
ENUM_TO_STR(XRT_PROBER_STRING_MANUFACTURER);
ENUM_TO_STR(XRT_PROBER_STRING_PRODUCT);
ENUM_TO_STR(XRT_PROBER_STRING_SERIAL_NUMBER);
}
return "";
}
const char *
xrt_bus_type_to_string(enum xrt_bus_type t)
{
switch (t) {
ENUM_TO_STR(XRT_BUS_TYPE_UNKNOWN);
ENUM_TO_STR(XRT_BUS_TYPE_USB);
ENUM_TO_STR(XRT_BUS_TYPE_BLUETOOTH);
}
return "";
}
bool
xrt_prober_match_string(struct xrt_prober *xp,
struct xrt_prober_device *dev,
enum xrt_prober_string type,
const char *to_match)
{
unsigned char s[256] = {0};
int len = xrt_prober_get_string_descriptor(xp, dev, type, s, sizeof(s));
if (len <= 0) {
return false;
}
return 0 == strncmp(to_match, (const char *)s, sizeof(s));
}
int
p_dev_get_usb_dev(struct prober *p,
uint16_t bus,