sr_info("Disabling external clock.");
devc->selected_clock_source = CLOCK_SOURCE_INT;
}
- if (sdi->status == SR_ST_ACTIVE)
- return lwla_set_clock_source(sdi);
break;
default:
return SR_ERR_NA;
return SR_OK;
}
+static int config_commit(const struct sr_dev_inst *sdi)
+{
+ if (sdi->status != SR_ST_ACTIVE) {
+ sr_err("Device not ready (status %d).", (int)sdi->status);
+ return SR_ERR;
+ }
+
+ return lwla_set_clock_source(sdi);
+}
+
static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_probe_group *probe_group)
{
.config_get = config_get,
.config_set = config_set,
.config_probe_set = config_probe_set,
+ .config_commit = config_commit,
.config_list = config_list,
.dev_open = dev_open,
.dev_close = dev_close,