- device->plugin = (struct sr_device_plugin *)plugin;
- device->plugin_index = plugin_index;
- devices = g_slist_append(devices, device);
-
- return device;
-}
-
-/**
- * Clear all probes of the specified device.
- *
- * This removes/clears the 'name' and 'trigger' fields of all probes of
- * the device.
- *
- * The order in which the probes are cleared is not specified. The caller
- * should not assume or rely on a specific order.
- *
- * TODO: Rename to sr_device_clear_probes() or sr_device_probe_clear_all().
- *
- * @param device The device whose probes to clear. Must not be NULL.
- * Note: device->probes is allowed to be NULL (in that case,
- * there are no probes, thus none have to be cleared).
- *
- * @return SR_OK upon success, SR_ERR_ARG upon invalid arguments.
- * If something other than SR_OK is returned, 'device' is unchanged.
- */
-int sr_device_clear(struct sr_device *device)
-{
- unsigned int pnum;
-
- if (!device) {
- sr_err("dev: %s: device was NULL", __func__);
- return SR_ERR_ARG;
- }
-
- /* Note: device->probes can be NULL, this is handled correctly. */
-
- for (pnum = 1; pnum <= g_slist_length(device->probes); pnum++)
- sr_device_probe_clear(device, pnum);
+ dev->plugin = (struct sr_dev_plugin *)plugin;
+ dev->plugin_index = plugin_index;
+ devs = g_slist_append(devs, dev);