aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/aice
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2021-04-14 23:44:57 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2021-05-01 13:35:51 +0100
commit11d918d9c1f7cb637a525a92521b747d2d4c840f (patch)
treea0cdb810fcbf24cfe740e01ddb1d879a1a450446 /src/jtag/aice
parenta60979b069b5964639d87ce268a37078c0fb57bb (diff)
downloadriscv-openocd-11d918d9c1f7cb637a525a92521b747d2d4c840f.zip
riscv-openocd-11d918d9c1f7cb637a525a92521b747d2d4c840f.tar.gz
riscv-openocd-11d918d9c1f7cb637a525a92521b747d2d4c840f.tar.bz2
libusb: don't use typedef's
Libusb defines both the struct and a typedef to the struct using the same struct name. It's then possible to use either 'struct x' and 'x'. E.g.: typedef struct libusb_device libusb_device; OpenOCD is not consistent and uses a mix of 'struct x' and 'x'. To make OpenOCD code uniform, stick at project's coding style and use 'struct x' in place of the typedef'd name. Change-Id: I901458b680e42830d3f371e47997157f91b7f675 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6165 Tested-by: jenkins Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li> Reviewed-by: Marc Schink <dev@zapb.de> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/jtag/aice')
-rw-r--r--src/jtag/aice/aice_usb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jtag/aice/aice_usb.c b/src/jtag/aice/aice_usb.c
index 7688aea..0c21980 100644
--- a/src/jtag/aice/aice_usb.c
+++ b/src/jtag/aice/aice_usb.c
@@ -349,8 +349,8 @@ static void aice_unpack_dthmb(uint8_t *cmd_ack_code, uint8_t *target_id,
/* calls the given usb_bulk_* function, allowing for the data to
* trickle in with some timeouts */
static int usb_bulk_with_retries(
- int (*f)(libusb_device_handle *, int, char *, int, int, int *),
- libusb_device_handle *dev, int ep,
+ int (*f)(struct libusb_device_handle *, int, char *, int, int, int *),
+ struct libusb_device_handle *dev, int ep,
char *bytes, int size, int timeout, int *transferred)
{
int tries = 3, count = 0;
@@ -369,7 +369,7 @@ static int usb_bulk_with_retries(
return ERROR_OK;
}
-static int wrap_usb_bulk_write(libusb_device_handle *dev, int ep,
+static int wrap_usb_bulk_write(struct libusb_device_handle *dev, int ep,
char *buff, int size, int timeout, int *transferred)
{
@@ -379,7 +379,7 @@ static int wrap_usb_bulk_write(libusb_device_handle *dev, int ep,
return 0;
}
-static inline int usb_bulk_write_ex(libusb_device_handle *dev, int ep,
+static inline int usb_bulk_write_ex(struct libusb_device_handle *dev, int ep,
char *bytes, int size, int timeout)
{
int tr = 0;