diff options
author | Nikolai Kondrashov <spbnick@gmail.com> | 2010-11-17 20:51:48 +0300 |
---|---|---|
committer | Nikolai Kondrashov <spbnick@gmail.com> | 2010-11-17 20:51:48 +0300 |
commit | 65c2e2a78aa4f26d2abcc12b500ee1b85b48abbe (patch) | |
tree | 2246a1ead7dcc4514f5776509a50b96564163a77 | |
parent | 4fb9dfd60bd99c1ddaad1f33c8d02ab3dd6182a6 (diff) | |
download | usbhid-dump-65c2e2a78aa4f26d2abcc12b500ee1b85b48abbe.tar.gz |
Minor naming cleanup in uhd_dev_list_open
Renamed vendor/product parameters to uhd_dev_list_open to vid/pid.
-rw-r--r-- | include/uhd/dev_list.h | 8 | ||||
-rw-r--r-- | lib/dev_list.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/uhd/dev_list.h b/include/uhd/dev_list.h index d75c613..1074d08 100644 --- a/include/uhd/dev_list.h +++ b/include/uhd/dev_list.h @@ -87,8 +87,8 @@ extern void uhd_dev_list_close(uhd_dev *list); * @param ctx Libusb context. * @param bus_num Bus number, or 0 for any bus. * @param dev_addr Device address, or 0 for any address. - * @param vendor Vendor ID, or 0 for any vendor. - * @param product Product ID, or 0 for any product. + * @param vid Vendor ID, or 0 for any vendor. + * @param pid Product ID, or 0 for any product. * @param plist Location for the resulting device list head; could be * NULL. * @@ -97,8 +97,8 @@ extern void uhd_dev_list_close(uhd_dev *list); extern enum libusb_error uhd_dev_list_open(libusb_context *ctx, uint8_t bus_num, uint8_t dev_addr, - uint16_t vendor, - uint16_t product, + uint16_t vid, + uint16_t pid, uhd_dev **plist); #ifdef __cplusplus diff --git a/lib/dev_list.c b/lib/dev_list.c index e23686e..d6c1192 100644 --- a/lib/dev_list.c +++ b/lib/dev_list.c @@ -69,7 +69,7 @@ uhd_dev_list_close(uhd_dev *list) enum libusb_error uhd_dev_list_open(libusb_context *ctx, uint8_t bus_num, uint8_t dev_addr, - uint16_t vendor, uint16_t product, + uint16_t vid, uint16_t pid, uhd_dev **plist) { enum libusb_error err = LIBUSB_ERROR_OTHER; @@ -104,14 +104,14 @@ uhd_dev_list_open(libusb_context *ctx, continue; /* Skip devices not matching vendor/product mask */ - if (vendor != UHD_VID_ANY || product != UHD_PID_ANY) + if (vid != UHD_VID_ANY || pid != UHD_PID_ANY) { err = libusb_get_device_descriptor(lusb_dev, &desc); if (err != LIBUSB_SUCCESS) goto cleanup; - if ((vendor != UHD_VID_ANY && vendor != desc.idVendor) || - (product != UHD_PID_ANY && product != desc.idProduct)) + if ((vid != UHD_VID_ANY && vid != desc.idVendor) || + (pid != UHD_PID_ANY && pid != desc.idProduct)) continue; } |