- dev->driver = (struct sr_dev_driver *)driver;
- dev->driver_index = driver_index;
- devs = g_slist_append(devs, dev);
-
- return dev;
-}
-
-/**
- * Add a probe with the specified name to the specified device.
- *
- * The added probe is automatically enabled (the 'enabled' field is TRUE).
- *
- * The 'trigger' field of the added probe is set to NULL. A trigger can be
- * added via sr_dev_trigger_set().
- *
- * TODO: Are duplicate names allowed?
- * TODO: Do we enforce a maximum probe number for a device?
- * TODO: Error if the max. probe number for the specific LA is reached, e.g.
- * if the caller tries to add more probes than the device actually has.
- *
- * @param dev The device to which to add a probe with the specified name.
- * Must not be NULL.
- * @param name The name of the probe to add to this device. Must not be NULL.
- * TODO: Maximum length, allowed characters, etc.
- *
- * @return SR_OK upon success, SR_ERR_MALLOC upon memory allocation errors,
- * or SR_ERR_ARG upon invalid arguments.
- * If something other than SR_OK is returned, 'dev' is unchanged.
- */
-SR_API int sr_dev_probe_add(struct sr_dev *dev, const char *name)
-{
- struct sr_probe *p;
- int probenum;
-
- if (!dev) {
- sr_err("dev: %s: dev was NULL", __func__);
- return SR_ERR_ARG;
- }
-
- if (!name) {
- sr_err("dev: %s: name was NULL", __func__);
- return SR_ERR_ARG;
- }
-
- /* TODO: Further checks to ensure name is valid. */