]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/fluke-dmm/api.c
Various errno/strerror() related fixes.
[libsigrok.git] / src / hardware / fluke-dmm / api.c
index 36142fd5587cd3614259a160dff1642bf94b4472..9c6c8a9437e885a2ed999ea01a2f758dc29b8dc9 100644 (file)
@@ -22,7 +22,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <string.h>
-#include <errno.h>
 #include "libsigrok.h"
 #include "libsigrok-internal.h"
 #include "fluke-dmm.h"
@@ -79,7 +78,7 @@ static GSList *fluke_scan(struct sr_dev_driver *di, const char *conn,
        if (serial_open(serial, SERIAL_RDWR) != SR_OK)
                return NULL;
 
-       drvc = di->priv;
+       drvc = di->context;
        b = buf;
        retry = 0;
        devices = NULL;
@@ -181,7 +180,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                                break;
                        /* The Scopemeter 199B, at least, requires this
                         * after all the 115k/9.6k confusion. */
-                       g_usleep(5000);
+                       g_usleep(5 * 1000);
                }
        }
 
@@ -190,7 +189,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
 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 int cleanup(const struct sr_dev_driver *di)
@@ -305,5 +304,5 @@ SR_PRIV struct sr_dev_driver flukedmm_driver_info = {
        .dev_close = std_serial_dev_close,
        .dev_acquisition_start = dev_acquisition_start,
        .dev_acquisition_stop = dev_acquisition_stop,
-       .priv = NULL,
+       .context = NULL,
 };