- if ((sr_config_list(driver, NULL, NULL,
- SR_CONF_SCAN_OPTIONS, &gvar_list) == SR_OK)) {
- hwopts = (const int32_t *)g_variant_get_fixed_array(gvar_list,
- &num_opts, sizeof(int32_t));
-
- for (unsigned int i = 0; i < num_opts; i++) {
- switch(hwopts[i]) {
- case SR_CONF_SERIALCOMM:
- set_serial_connection();
- break;
-
- default:
- continue;
- }
-
- break;
- }
- g_variant_unref(gvar_list);
- }
-}
-
-void Connect::free_drvopts(struct sr_config *src)
-{
- g_variant_unref(src->data);
- g_free(src);
+ if (driver->config_check(ConfigKey::SERIALCOMM, ConfigKey::SCAN_OPTIONS))
+ set_serial_connection();