]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hameg-hmo/api.c
portability: Use g_ascii_strcasecmp() in favor of strcasecmp().
[libsigrok.git] / src / hardware / hameg-hmo / api.c
index 4622ab613fd69b13f88cbbe278c6c1881c05a985..f1c271c895619c641768147354b9f87f7ca8a2c2 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <stdlib.h>
+#include "scpi.h"
 #include "protocol.h"
 
 #define SERIALCOMM "115200/8n1/flow=1"
@@ -109,20 +110,19 @@ fail:
                sr_scpi_hw_info_free(hw_info);
        if (sdi)
                sr_dev_inst_free(sdi);
-       if (devc)
-               g_free(devc);
+       g_free(devc);
 
        return NULL;
 }
 
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
-       return sr_scpi_scan(di->priv, options, hmo_probe_serial_device);
+       return sr_scpi_scan(di->context, options, hmo_probe_serial_device);
 }
 
 static GSList *dev_list(const struct sr_dev_driver *di)
 {
-       return ((struct drv_context *)(di->priv))->instances;
+       return ((struct drv_context *)(di->context))->instances;
 }
 
 static void clear_helper(void *priv)
@@ -810,5 +810,5 @@ SR_PRIV struct sr_dev_driver hameg_hmo_driver_info = {
        .dev_close = dev_close,
        .dev_acquisition_start = dev_acquisition_start,
        .dev_acquisition_stop = dev_acquisition_stop,
-       .priv = NULL,
+       .context = NULL,
 };