forked from Ivasoft/DSView
Code refactoring 24
This commit is contained in:
@@ -310,8 +310,8 @@ static int hw_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi)
|
||||
|
||||
if (sdi->status == SR_ST_ACTIVE) {
|
||||
/* Device is already in use. */
|
||||
sr_info("Device is actived, can't to open, handle:%p", usb->usb_dev);
|
||||
return SR_ERR;
|
||||
sr_detail("The usb device is opened, handle:%p", usb->usb_dev);
|
||||
return SR_OK;
|
||||
}
|
||||
|
||||
if (sdi->status == SR_ST_INITIALIZING) {
|
||||
@@ -319,7 +319,7 @@ static int hw_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi)
|
||||
}
|
||||
dev_handel = usb->usb_dev;
|
||||
|
||||
sr_info("Open device instance, handle: %p", dev_handel);
|
||||
sr_info("Open usb device instance, handle: %p", dev_handel);
|
||||
|
||||
if (libusb_open(dev_handel, &usb->devhdl) != 0){
|
||||
sr_err("Failed to open device: %s, handle:%p",
|
||||
|
||||
@@ -1369,10 +1369,12 @@ static int dev_acquisition_start(struct sr_dev_inst *sdi, void *cb_data)
|
||||
/* Stop Previous GPIF acquisition */
|
||||
wr_cmd.header.dest = DSL_CTL_STOP;
|
||||
wr_cmd.header.size = 0;
|
||||
|
||||
if ((ret = command_ctl_wr(usb->devhdl, wr_cmd)) != SR_OK) {
|
||||
sr_err("%s: Stop DSLogic acquisition failed!", __func__);
|
||||
return ret;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
sr_info("%s: Stop Previous DSLogic acquisition!", __func__);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user