]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/motech-lps-30x/api.c
Don't reset instance list in scan() callback
[libsigrok.git] / src / hardware / motech-lps-30x / api.c
index 57befbfd6edf6e9c06e5b2c8bead3e2266a52c84..ce3294e979271921e299d74e62e0f815b37b54d4 100644 (file)
@@ -28,9 +28,6 @@
 #include <math.h>
 #include <string.h>
 #include "protocol.h"
-
-/* Forward declarations */
-SR_PRIV struct sr_dev_driver motech_lps_301_driver_info;
 SR_PRIV int lps_read_reply(struct sr_serial_dev_inst *serial, char **buf, int *buflen);
 SR_PRIV int lps_send_va(struct sr_serial_dev_inst *serial, const char *fmt, va_list args);
 SR_PRIV int lps_cmd_ok(struct sr_serial_dev_inst *serial, const char *fmt, ...);
@@ -387,7 +384,6 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o
        devices = NULL;
 
        drvc = drv->context;
-       drvc->instances = NULL;
 
        sr_spew("scan() called!");
 
@@ -801,7 +797,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
                        sdi->conn, LOG_PREFIX);
 }
 
-SR_PRIV struct sr_dev_driver motech_lps_301_driver_info = {
+static struct sr_dev_driver motech_lps_301_driver_info = {
        .name = "motech-lps-301",
        .longname = "Motech LPS-301",
        .api_version = 1,
@@ -819,3 +815,4 @@ SR_PRIV struct sr_dev_driver motech_lps_301_driver_info = {
        .dev_acquisition_stop = dev_acquisition_stop,
        .context = NULL,
 };
+SR_REGISTER_DEV_DRIVER(motech_lps_301_driver_info);