The member add_iso_packet_size of struct usbi_os_backend is set to 0 in
all backends and thus has no actual use. This has been the case since
commit
ad6e2b71 ("Linux: fire multiple URBs at once for split
transfers").
Also, the comment above the member actually states the fact that it is
unused and could potentially be removed, so remove it.
Closes #62
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
int iso_packets)
{
struct libusb_transfer *transfer;
- size_t os_alloc_size = usbi_backend->transfer_priv_size
- + (usbi_backend->add_iso_packet_size * iso_packets);
+ size_t os_alloc_size = usbi_backend->transfer_priv_size;
size_t alloc_size = sizeof(struct usbi_transfer)
+ sizeof(struct libusb_transfer)
+ (sizeof(struct libusb_iso_packet_descriptor) * iso_packets)
* usbi_transfer_get_os_priv() on the appropriate usbi_transfer instance.
*/
size_t transfer_priv_size;
-
- /* Mumber of additional bytes for os_priv for each iso packet.
- * Can your backend use this? */
- /* FIXME: linux can't use this any more. if other OS's cannot either,
- * then remove this */
- size_t add_iso_packet_size;
};
extern const struct usbi_os_backend * const usbi_backend;
.device_priv_size = sizeof(struct darwin_device_priv),
.device_handle_priv_size = sizeof(struct darwin_device_handle_priv),
.transfer_priv_size = sizeof(struct darwin_transfer_priv),
- .add_iso_packet_size = 0,
};
/*.device_priv_size =*/ sizeof(USBDevice*),
/*.device_handle_priv_size =*/ sizeof(USBDeviceHandle*),
/*.transfer_priv_size =*/ sizeof(USBTransfer*),
- /*.add_iso_packet_size =*/ 0,
};
.device_priv_size = sizeof(struct linux_device_priv),
.device_handle_priv_size = sizeof(struct linux_device_handle_priv),
.transfer_priv_size = sizeof(struct linux_transfer_priv),
- .add_iso_packet_size = 0,
};
sizeof(struct device_priv),
sizeof(struct handle_priv),
0, /* transfer_priv_size */
- 0, /* add_iso_packet_size */
};
int
sizeof(struct device_priv),
sizeof(struct handle_priv),
0, /* transfer_priv_size */
- 0, /* add_iso_packet_size */
};
#define DEVPATH "/dev/"
sizeof(struct wince_device_priv),
sizeof(struct wince_device_handle_priv),
sizeof(struct wince_transfer_priv),
- 0,
};
sizeof(struct windows_device_priv),
sizeof(struct windows_device_handle_priv),
sizeof(struct windows_transfer_priv),
- 0,
};
-#define LIBUSB_NANO 10978
+#define LIBUSB_NANO 10979