This is an automated email from Gerrit. "Anders Montonen <anders.monto...@iki.fi>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7547
-- gerrit commit 12bd8d11578af0c67b301fe263ec191d8d95d8c7 Author: Anders Montonen <anders.monto...@iki.fi> Date: Tue Mar 21 22:45:49 2023 +0200 drivers/libusb_helper: make jtag_libusb_location_equal() public Allow the function to be used in drivers with custom libusb open functions. Signed-off-by: Anders Montonen <anders.monto...@iki.fi> Change-Id: Iaddc82819aae1c840d3875313f593aa4242a67a4 diff --git a/src/jtag/drivers/libusb_helper.c b/src/jtag/drivers/libusb_helper.c index 4b098b482f..fcba16d0df 100644 --- a/src/jtag/drivers/libusb_helper.c +++ b/src/jtag/drivers/libusb_helper.c @@ -63,7 +63,7 @@ bool jtag_libusb_match_ids(struct libusb_device_descriptor *dev_desc, } #ifdef HAVE_LIBUSB_GET_PORT_NUMBERS -static bool jtag_libusb_location_equal(struct libusb_device *device) +bool jtag_libusb_location_equal(struct libusb_device *device) { uint8_t port_path[MAX_USB_PORTS]; uint8_t dev_bus; @@ -80,7 +80,7 @@ static bool jtag_libusb_location_equal(struct libusb_device *device) return adapter_usb_location_equal(dev_bus, port_path, path_len); } #else /* HAVE_LIBUSB_GET_PORT_NUMBERS */ -static bool jtag_libusb_location_equal(struct libusb_device *device) +bool jtag_libusb_location_equal(struct libusb_device *device) { return true; } diff --git a/src/jtag/drivers/libusb_helper.h b/src/jtag/drivers/libusb_helper.h index 799e3e6a91..e0ddc4b7be 100644 --- a/src/jtag/drivers/libusb_helper.h +++ b/src/jtag/drivers/libusb_helper.h @@ -32,6 +32,7 @@ typedef char * (*adapter_get_alternate_serial_fn)(struct libusb_device_handle *d bool jtag_libusb_match_ids(struct libusb_device_descriptor *dev_desc, const uint16_t vids[], const uint16_t pids[]); +bool jtag_libusb_location_equal(struct libusb_device *device); int jtag_libusb_open(const uint16_t vids[], const uint16_t pids[], struct libusb_device_handle **out, adapter_get_alternate_serial_fn adapter_get_alternate_serial); --