hameg-hmo: Close the device after initial scan.

The device is after a scan left open and clients that don't call unconditionally
dev_open() will never fetch the initial device state.

Close the device after the scan so clients know they need to open it.
This commit is contained in:
poljar (Damir Jelić) 2014-01-16 15:28:51 +01:00 committed by Bert Vermeulen
parent 965b463d98
commit 68e3d07014
1 changed files with 4 additions and 0 deletions

View File

@ -251,6 +251,10 @@ static struct sr_dev_inst *hmo_probe_serial_device(const char *serial_device,
if (hmo_init_device(sdi) != SR_OK)
goto fail;
sr_scpi_close(sdi->conn);
sdi->status = SR_ST_INACTIVE;
return sdi;
fail: