- GSList *plugins, *l;
- struct device_plugin *plugin;
- int num_devices, num_probes, i;
-
- plugins = list_hwplugins();
-
- /*
- * Initialize all plugins first. Since the init() call may involve
- * a firmware upload and associated delay, we may as well get all
- * of these out of the way first.
- */
- for (l = plugins; l; l = l->next) {
- plugin = l->data;
- g_message("initializing %s plugin", plugin->name);
- num_devices = plugin->init(NULL);
- for (i = 0; i < num_devices; i++) {
- num_probes = (int)plugin->get_device_info(i, DI_NUM_PROBES);
- device_new(plugin, i, num_probes);
+ GSList *l;
+ struct sr_probe *probe;
+ int ret;
+
+ if (!sdi) {
+ sr_err("%s: sdi was NULL", __func__);
+ return SR_ERR_ARG;
+ }
+
+ ret = SR_ERR_ARG;
+ for (l = sdi->probes; l; l = l->next) {
+ probe = l->data;
+ if (probe->index == probenum) {
+ g_free(probe->name);
+ probe->name = g_strdup(name);
+ ret = SR_OK;
+ break;