- 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;
- }
- }
-
- return ret;
-}
-
-/**
- * Enable or disable a probe on the specified device.
- *
- * @param sdi The device instance the probe is connected to.
- * @param probenum The probe number, starting from 0.
- * @param state TRUE to enable the probe, FALSE to disable.
- *
- * @return SR_OK on success, or SR_ERR_ARG on invalid arguments.
- */
-SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int probenum,
- gboolean state)
-{
- GSList *l;
- struct sr_probe *probe;
- int ret;
-
- if (!sdi)
- return SR_ERR_ARG;
-
- ret = SR_ERR_ARG;
- for (l = sdi->probes; l; l = l->next) {
- probe = l->data;
- if (probe->index == probenum) {
- probe->enabled = state;
+ for (l = sdi->channels; l; l = l->next) {
+ ch = l->data;
+ if (ch->index == channelnum) {
+ g_free(ch->name);
+ ch->name = g_strdup(name);