From: Krzysztof Opasiak Date: Mon, 29 Jun 2015 16:33:24 +0000 (+0200) Subject: Drop 3rd param from get_max_packet_size() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e35c7efc35e0d29f52bdfd20ebb09a5e8f9172d;p=platform%2Fcore%2Fapi%2Fusb-host.git Drop 3rd param from get_max_packet_size() As we may call libusb_get_max_iso_packet_size() for all types of endpoints and all results are correct let's just drop 3rd param from our API function so we don't confuse our users. Change-Id: I6c4075e85728449a4e308af024cea18a35a46371 Signed-off-by: Krzysztof Opasiak --- diff --git a/include/libhusb.h b/include/libhusb.h index 9bca0a3..fa26362 100644 --- a/include/libhusb.h +++ b/include/libhusb.h @@ -130,7 +130,7 @@ ssize_t libhusb_get_devices(libhusb_context *ctx, libhusb_device ***devs); void libhusb_free_devices(libhusb_device **list, int unref_devices); -int libhusb_get_max_packet_size(libhusb_device *dev, uint8_t endpoint, int iso); +int libhusb_get_max_packet_size(libhusb_device *dev, uint8_t endpoint); uint8_t libhusb_get_bus_number(libhusb_device *dev); diff --git a/src/libhusb.c b/src/libhusb.c index 4acc4af..02ca338 100644 --- a/src/libhusb.c +++ b/src/libhusb.c @@ -163,19 +163,13 @@ void libhusb_free_devices(libhusb_device **list, int unref_devices) free(list); } -int libhusb_get_max_packet_size(libhusb_device *dev, uint8_t endpoint, int iso) +int libhusb_get_max_packet_size(libhusb_device *dev, uint8_t endpoint) { int ret; assert(dev); - if (iso == 1) { - ret = libusb_get_max_iso_packet_size(dev->lusb_dev, endpoint); - } - else { - ret = libusb_get_max_packet_size(dev->lusb_dev, endpoint); - } - + ret = libusb_get_max_iso_packet_size(dev->lusb_dev, endpoint); if (ret < 0) ret = usb_device_get_error_num(ret);