+#ifdef HAVE_LA_FX2LAFW
+ &fx2lafw_plugin_info,
+#endif
+ NULL,
+};
+
+/**
+ * Return the list of loaded hardware plugins.
+ *
+ * The list of plugins is initialized from sr_init(), and can only be reset
+ * by calling sr_exit().
+ *
+ * @return Pointer to the NULL-terminated list of hardware plugin pointers.
+ */
+SR_API struct sr_dev_plugin **sr_hw_list(void)
+{
+ return plugins_list;
+}
+
+/**
+ * Initialize a hardware plugin.
+ *
+ * The specified plugin is initialized, and all devices discovered by the
+ * plugin are instantiated.
+ *
+ * @param plugin The plugin to initialize.
+ *
+ * @return The number of devices found and instantiated by the plugin.
+ */
+SR_API int sr_hw_init(struct sr_dev_plugin *plugin)
+{
+ int num_devs, num_probes, i, j;
+ int num_initialized_devs = 0;
+ struct sr_dev *dev;
+ char **probe_names;
+
+ sr_dbg("initializing %s plugin", plugin->name);
+ num_devs = plugin->init(NULL);
+ for (i = 0; i < num_devs; i++) {
+ num_probes = GPOINTER_TO_INT(
+ plugin->dev_info_get(i, SR_DI_NUM_PROBES));
+ probe_names = (char **)plugin->dev_info_get(i,
+ SR_DI_PROBE_NAMES);
+
+ if (!probe_names) {
+ sr_warn("hwplugin: %s: plugin %s does not return a "
+ "list of probe names", __func__, plugin->name);
+ continue;
+ }
+
+ dev = sr_dev_new(plugin, i);
+ for (j = 0; j < num_probes; j++)
+ sr_dev_probe_add(dev, probe_names[j]);
+ num_initialized_devs++;
+ }