From ab6a4897b6f2ac55bdf3f8a86cf3af2a3f2b3f2a Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Mon, 24 Oct 2016 17:43:46 -0700 Subject: extra/usb_gpio: fix misspelled variable name This should be 'transferred'. BUG=None BRANCH=None TEST=make buildall passes Change-Id: I40c3c456256eb1d4ae553545497566afae929e32 Signed-off-by: Martin Roth Reviewed-on: https://chromium-review.googlesource.com/403422 Reviewed-by: Patrick Georgi --- extra/usb_gpio/usb_gpio.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'extra/usb_gpio') diff --git a/extra/usb_gpio/usb_gpio.c b/extra/usb_gpio/usb_gpio.c index 70cf4a81c2..9afe2c2e29 100644 --- a/extra/usb_gpio/usb_gpio.c +++ b/extra/usb_gpio/usb_gpio.c @@ -34,7 +34,7 @@ static int gpio_write(libusb_device_handle *device, uint32_t clear_mask) { uint8_t command[8]; - int transfered; + int transferred; command[0] = (set_mask >> 0) & 0xff; command[1] = (set_mask >> 8) & 0xff; @@ -50,14 +50,14 @@ static int gpio_write(libusb_device_handle *device, LIBUSB_ENDPOINT_OUT | 2, command, sizeof(command), - &transfered, + &transferred, TRANSFER_TIMEOUT_MS)); - if (transfered != sizeof(command)) { + if (transferred != sizeof(command)) { fprintf(stderr, "Failed to transfer full command " "(sent %d of %d bytes)\n", - transfered, + transferred, (int)sizeof(command)); return LIBUSB_ERROR_OTHER; } @@ -68,7 +68,7 @@ static int gpio_write(libusb_device_handle *device, static int gpio_read(libusb_device_handle *device, uint32_t *mask) { uint8_t response[4]; - int transfered; + int transferred; /* * The first query does triggers the sampling of the GPIO values, the @@ -78,21 +78,21 @@ static int gpio_read(libusb_device_handle *device, uint32_t *mask) LIBUSB_ENDPOINT_IN | 2, response, sizeof(response), - &transfered, + &transferred, TRANSFER_TIMEOUT_MS)); CHECK(libusb_bulk_transfer(device, LIBUSB_ENDPOINT_IN | 2, response, sizeof(response), - &transfered, + &transferred, TRANSFER_TIMEOUT_MS)); - if (transfered != sizeof(response)) { + if (transferred != sizeof(response)) { fprintf(stderr, "Failed to transfer full response " "(read %d of %d bytes)\n", - transfered, + transferred, (int)sizeof(response)); return LIBUSB_ERROR_OTHER; } -- cgit v1.2.1