summaryrefslogtreecommitdiff
path: root/fastboot/device/usb.cpp
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2021-04-07 05:35:55 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-04-07 05:35:55 +0000
commitec6cfacad7283c60a33cfefacf5031247a2f81dc (patch)
tree5b473e86fc8ab0afc2241b6ac25875b25fa354bd /fastboot/device/usb.cpp
parent79aff2b0a0653fcafaf9099ad60075f2903e8de1 (diff)
parent268fff7088f0ab311c2de902178054ce40a42243 (diff)
Merge "Merge SP1A.210329.001" into s-keystone-qcom-dev
Diffstat (limited to 'fastboot/device/usb.cpp')
-rw-r--r--fastboot/device/usb.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fastboot/device/usb.cpp b/fastboot/device/usb.cpp
index 4bee7b20c..4115a6d28 100644
--- a/fastboot/device/usb.cpp
+++ b/fastboot/device/usb.cpp
@@ -82,7 +82,7 @@ static int usb_ffs_write(usb_handle* h, const void* data, int len) {
int orig_len = len;
while (len > 0) {
int write_len = std::min(USB_FFS_BULK_SIZE, len);
- int n = write(h->bulk_in, buf, write_len);
+ int n = write(h->bulk_in.get(), buf, write_len);
if (n < 0) {
D("ERROR: fd = %d, n = %d: %s", h->bulk_in.get(), n, strerror(errno));
return -1;
@@ -103,7 +103,7 @@ static int usb_ffs_read(usb_handle* h, void* data, int len, bool allow_partial)
unsigned count = 0;
while (len > 0) {
int read_len = std::min(USB_FFS_BULK_SIZE, len);
- int n = read(h->bulk_out, buf, read_len);
+ int n = read(h->bulk_out.get(), buf, read_len);
if (n < 0) {
D("ERROR: fd = %d, n = %d: %s", h->bulk_out.get(), n, strerror(errno));
return -1;