summaryrefslogtreecommitdiffstats
path: root/lib/libusb/libusb20.c
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2010-10-14 20:38:18 +0000
committerhselasky <hselasky@FreeBSD.org>2010-10-14 20:38:18 +0000
commit1c90ef127420e8aa353a34eb7fcf3d20ec303c46 (patch)
treed4dbe756b857cc1d5d92c6a6cbe7950dc7456747 /lib/libusb/libusb20.c
parentd82c33e9e33482e03f46031fd3c98d3967ce094e (diff)
downloadFreeBSD-src-1c90ef127420e8aa353a34eb7fcf3d20ec303c46.zip
FreeBSD-src-1c90ef127420e8aa353a34eb7fcf3d20ec303c46.tar.gz
- Add support for LibUSB in 32-bit compatibility mode.
Approved by: thompsa (mentor)
Diffstat (limited to 'lib/libusb/libusb20.c')
-rw-r--r--lib/libusb/libusb20.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libusb/libusb20.c b/lib/libusb/libusb20.c
index 3efa9c7..f8edfc3 100644
--- a/lib/libusb/libusb20.c
+++ b/lib/libusb/libusb20.c
@@ -320,7 +320,7 @@ libusb20_tr_clear_stall_sync(struct libusb20_transfer *xfer)
void
libusb20_tr_set_buffer(struct libusb20_transfer *xfer, void *buffer, uint16_t frIndex)
{
- xfer->ppBuffer[frIndex] = buffer;
+ xfer->ppBuffer[frIndex] = libusb20_pass_ptr(buffer);
return;
}
@@ -386,7 +386,7 @@ libusb20_tr_set_total_frames(struct libusb20_transfer *xfer, uint32_t nFrames)
void
libusb20_tr_setup_bulk(struct libusb20_transfer *xfer, void *pBuf, uint32_t length, uint32_t timeout)
{
- xfer->ppBuffer[0] = pBuf;
+ xfer->ppBuffer[0] = libusb20_pass_ptr(pBuf);
xfer->pLength[0] = length;
xfer->timeout = timeout;
xfer->nFrames = 1;
@@ -398,7 +398,7 @@ libusb20_tr_setup_control(struct libusb20_transfer *xfer, void *psetup, void *pB
{
uint16_t len;
- xfer->ppBuffer[0] = psetup;
+ xfer->ppBuffer[0] = libusb20_pass_ptr(psetup);
xfer->pLength[0] = 8; /* fixed */
xfer->timeout = timeout;
@@ -406,7 +406,7 @@ libusb20_tr_setup_control(struct libusb20_transfer *xfer, void *psetup, void *pB
if (len != 0) {
xfer->nFrames = 2;
- xfer->ppBuffer[1] = pBuf;
+ xfer->ppBuffer[1] = libusb20_pass_ptr(pBuf);
xfer->pLength[1] = len;
} else {
xfer->nFrames = 1;
@@ -417,7 +417,7 @@ libusb20_tr_setup_control(struct libusb20_transfer *xfer, void *psetup, void *pB
void
libusb20_tr_setup_intr(struct libusb20_transfer *xfer, void *pBuf, uint32_t length, uint32_t timeout)
{
- xfer->ppBuffer[0] = pBuf;
+ xfer->ppBuffer[0] = libusb20_pass_ptr(pBuf);
xfer->pLength[0] = length;
xfer->timeout = timeout;
xfer->nFrames = 1;
@@ -431,7 +431,7 @@ libusb20_tr_setup_isoc(struct libusb20_transfer *xfer, void *pBuf, uint32_t leng
/* should not happen */
return;
}
- xfer->ppBuffer[frIndex] = pBuf;
+ xfer->ppBuffer[frIndex] = libusb20_pass_ptr(pBuf);
xfer->pLength[frIndex] = length;
return;
}
@@ -1167,7 +1167,7 @@ libusb20_be_alloc_ugen20(void)
{
struct libusb20_backend *pbe;
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
pbe = libusb20_be_alloc(&libusb20_ugen20_backend);
#else
pbe = NULL;
OpenPOWER on IntegriCloud