Skip to content

Commit

Permalink
Minor naming cleanup in uhd_dev_list_open
Browse files Browse the repository at this point in the history
Renamed vendor/product parameters to uhd_dev_list_open to vid/pid.
  • Loading branch information
spbnick committed Nov 17, 2010
1 parent 4fb9dfd commit 65c2e2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/uhd/dev_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions lib/dev_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 65c2e2a

Please sign in to comment.