static struct ser_hid_chip_functions **chips[SER_HID_CHIP_LAST] = {
[SER_HID_CHIP_UNKNOWN] = NULL,
+ [SER_HID_CHIP_BTC_BU86X] = &ser_hid_chip_funcs_bu86x,
[SER_HID_CHIP_SIL_CP2110] = &ser_hid_chip_funcs_cp2110,
+ [SER_HID_CHIP_VICTOR_DMM] = &ser_hid_chip_funcs_victor,
[SER_HID_CHIP_WCH_CH9325] = &ser_hid_chip_funcs_ch9325,
};
if (!vid_pids)
continue;
while (vid_pids->vid) {
- if (vid_pids->vid == vid && vid_pids->pid == pid) {
+ if (vid_pids->vid == vid && vid_pids->pid == pid)
return desc->chipname;
- }
vid_pids++;
}
}
* Immediately satisfy the caller's request from the RX buffer
* if the requested amount of data is available already.
*/
- if (sr_ser_has_queued_data(serial) >= count) {
- rc = sr_ser_unqueue_rx_data(serial, buf, count);
- return rc;
- }
+ if (sr_ser_has_queued_data(serial) >= count)
+ return sr_ser_unqueue_rx_data(serial, buf, count);
/*
* When a timeout was specified, then determine the deadline
if (got > count)
got = count;
sr_dbg("DBG: %s() passing %d bytes.", __func__, got);
- rc = sr_ser_unqueue_rx_data(serial, buf, count);
- return rc;
+ return sr_ser_unqueue_rx_data(serial, buf, count);
}
static struct ser_lib_functions serlib_hid = {