aboutsummaryrefslogtreecommitdiff
path: root/lib/libusb/libusb20_ugen20.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libusb/libusb20_ugen20.c')
-rw-r--r--lib/libusb/libusb20_ugen20.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libusb/libusb20_ugen20.c b/lib/libusb/libusb20_ugen20.c
index 73daa4099a69..5b7d5e85a063 100644
--- a/lib/libusb/libusb20_ugen20.c
+++ b/lib/libusb/libusb20_ugen20.c
@@ -226,7 +226,7 @@ ugen20_readdir(struct ugen20_urd_state *st)
repeat:
if (st->ptr == NULL) {
st->urd.urd_startentry += st->nparsed;
- st->urd.urd_data = st->buf;
+ st->urd.urd_data = libusb20_pass_ptr(st->buf);
st->urd.urd_maxlen = sizeof(st->buf);
st->nparsed = 0;
@@ -339,7 +339,7 @@ ugen20_tr_renew(struct libusb20_device *pdev)
memset(&fs_init, 0, sizeof(fs_init));
- fs_init.pEndpoints = pdev->privBeData;
+ fs_init.pEndpoints = libusb20_pass_ptr(pdev->privBeData);
fs_init.ep_index_max = nMaxTransfer;
if (ioctl(pdev->file, USB_FS_INIT, &fs_init)) {
@@ -453,7 +453,7 @@ ugen20_get_config_desc_full(struct libusb20_device *pdev,
memset(&cdesc, 0, sizeof(cdesc));
memset(&gen_desc, 0, sizeof(gen_desc));
- gen_desc.ugd_data = &cdesc;
+ gen_desc.ugd_data = libusb20_pass_ptr(&cdesc);
gen_desc.ugd_maxlen = sizeof(cdesc);
gen_desc.ugd_config_index = cfg_index;
@@ -474,7 +474,7 @@ ugen20_get_config_desc_full(struct libusb20_device *pdev,
/* make sure memory is initialised */
memset(ptr, 0, len);
- gen_desc.ugd_data = ptr;
+ gen_desc.ugd_data = libusb20_pass_ptr(ptr);
gen_desc.ugd_maxlen = len;
error = ioctl(pdev->file_ctrl, USB_GET_FULL_DESC, &gen_desc);
@@ -666,7 +666,7 @@ ugen20_do_request_sync(struct libusb20_device *pdev,
memset(&req, 0, sizeof(req));
- req.ucr_data = data;
+ req.ucr_data = libusb20_pass_ptr(data);
if (!(flags & LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK)) {
req.ucr_flags |= USB_SHORT_XFER_OK;
}
@@ -761,9 +761,9 @@ ugen20_tr_open(struct libusb20_transfer *xfer, uint32_t MaxBufSize,
xfer->maxTotalLength = temp.max_bufsize;
xfer->maxPacketLen = temp.max_packet_length;
- /* setup buffer and length lists */
- fsep->ppBuffer = xfer->ppBuffer;/* zero copy */
- fsep->pLength = xfer->pLength; /* zero copy */
+ /* setup buffer and length lists using zero copy */
+ fsep->ppBuffer = libusb20_pass_ptr(xfer->ppBuffer);
+ fsep->pLength = libusb20_pass_ptr(xfer->pLength);
return (0); /* success */
}
@@ -883,7 +883,7 @@ ugen20_dev_get_iface_desc(struct libusb20_device *pdev,
memset(&ugd, 0, sizeof(ugd));
- ugd.ugd_data = buf;
+ ugd.ugd_data = libusb20_pass_ptr(buf);
ugd.ugd_maxlen = len;
ugd.ugd_iface_index = iface_index;