diff options
author | Mantas Mikulėnas <grawity@gmail.com> | 2019-05-06 12:02:19 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-06 14:29:36 +0200 |
commit | 4ad6ff026d7ca4024ed4d219e674c3568a6275cb (patch) | |
tree | 7d4952dcc1032853a35cbeb2d157cb78efd2e6ac | |
parent | 91f462e8d1628d8e6c153796757559dd9bff804f (diff) | |
download | usbutils-4ad6ff026d7ca4024ed4d219e674c3568a6275cb.tar.gz |
lsusb.py: remove now-unused bin_search()
Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | lsusb.py.in | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lsusb.py.in b/lsusb.py.in index 9504002..5eabeef 100644 --- a/lsusb.py.in +++ b/lsusb.py.in @@ -157,25 +157,6 @@ def parse_usb_ids(): continue mode = modes.Misc -def bin_search(first, last, item, list): - "binary search on list, returns -1 on fail, match idx otherwise, recursive" - #print("bin_search(%i,%i)" % (first, last)) - if first == last: - return -1 - if first == last-1: - if item == list[first]: - return first - else: - return -1 - mid = (first+last) // 2 - if item == list[mid]: - return mid - elif item < list[mid]: - return bin_search(first, mid, item, list) - else: - return bin_search(mid, last, item, list) - - def find_usb_prod(vid, pid): "Return device name from USB Vendor:Product list" strg = "" |