+ struct drv_context *drvc;
+ struct dev_context *devc;
+
+ drvc = di->priv;
+
+ /* Properly close all devices. */
+ for (l = drvc->instances; l; l = l->next) {
+ if (!(sdi = l->data)) {
+ /* Log error, but continue cleaning up the rest. */
+ sr_err("%s: sdi was NULL, continuing", __func__);
+ continue;
+ }
+ if (sdi->priv) {
+ devc = sdi->priv;
+ ftdi_deinit(&devc->ftdic);
+ }
+ sr_dev_inst_free(sdi);
+ }
+ g_slist_free(drvc->instances);
+ drvc->instances = NULL;
+
+ return SR_OK;
+}
+
+static int hw_init(struct sr_context *sr_ctx)
+{
+ return std_hw_init(sr_ctx, di, LOG_PREFIX);
+}
+
+static GSList *hw_scan(GSList *options)
+{
+ struct sr_dev_inst *sdi;
+ struct sr_probe *probe;
+ struct drv_context *drvc;
+ struct dev_context *devc;
+ GSList *devices;