]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hameg-hmo/api.c
Put driver pointers into special section
[libsigrok.git] / src / hardware / hameg-hmo / api.c
index 4b50b7aa6edb7a37dffaea3bdcac019de899def5..4ed9527e5a154a071d023a79505a859a0c572a91 100644 (file)
@@ -24,7 +24,7 @@
 
 #define SERIALCOMM "115200/8n1/flow=1"
 
-SR_PRIV struct sr_dev_driver hameg_hmo_driver_info;
+static struct sr_dev_driver hameg_hmo_driver_info;
 
 static const char *manufacturers[] = {
        "HAMEG",
@@ -487,7 +487,8 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
        struct dev_context *devc = NULL;
        const struct scope_config *model = NULL;
 
-       if (sdi && (devc = sdi->priv)) {
+       if (sdi) {
+               devc = sdi->priv;
                if ((cg_type = check_channel_group(devc, cg)) == CG_INVALID)
                        return SR_ERR;
 
@@ -772,7 +773,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-SR_PRIV struct sr_dev_driver hameg_hmo_driver_info = {
+static struct sr_dev_driver hameg_hmo_driver_info = {
        .name = "hameg-hmo",
        .longname = "Hameg HMO",
        .api_version = 1,
@@ -790,3 +791,4 @@ SR_PRIV struct sr_dev_driver hameg_hmo_driver_info = {
        .dev_acquisition_stop = dev_acquisition_stop,
        .context = NULL,
 };
+SR_REGISTER_DEV_DRIVER(hameg_hmo_driver_info);