+
+ /* Properly close all devices. */
+ for (l = adi->instances; l; l = l->next) {
+ if (!(sdi = l->data)) {
+ /* Log error, but continue cleaning up the rest. */
+ sr_err("sigma: %s: sdi was NULL, continuing", __func__);
+ continue;
+ }
+ if (sdi->priv) {
+ ctx = sdi->priv;
+ ftdi_free(&ctx->ftdic);
+ g_free(ctx);
+ }
+ sr_dev_inst_free(sdi);
+ }
+ g_slist_free(adi->instances);
+ adi->instances = NULL;
+
+}
+
+static int hw_init(void)
+{
+
+ /* Nothing to do. */
+
+ return SR_OK;
+}
+
+static GSList *hw_scan(GSList *options)
+{
+ struct sr_dev_inst *sdi;
+ struct context *ctx;
+ GSList *devices;