]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/yokogawa-dlm/api.c
scpi: Update names of a few *_OUTPUT_* items.
[libsigrok.git] / src / hardware / yokogawa-dlm / api.c
index 054d431db7eae22b43615e39885dba3cd137883a..1bbab68992fa8fac96b3a7585e66d7ff70558963 100644 (file)
@@ -23,8 +23,8 @@
 
 SR_PRIV struct sr_dev_driver yokogawa_dlm_driver_info;
 
-static char *MANUFACTURER_ID = "YOKOGAWA";
-static char *MANUFACTURER_NAME = "Yokogawa";
+static const char *MANUFACTURER_ID = "YOKOGAWA";
+static const char *MANUFACTURER_NAME = "Yokogawa";
 
 static const uint32_t drvopts[] = {
        SR_CONF_LOGIC_ANALYZER,
@@ -97,8 +97,7 @@ 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;
 }
@@ -178,7 +177,7 @@ static int check_channel_group(struct dev_context *devc,
                        const struct sr_channel_group *cg)
 {
        unsigned int i;
-       struct scope_config *model;
+       const struct scope_config *model;
 
        model = devc->model_config;
 
@@ -203,7 +202,7 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
        int ret, cg_type;
        unsigned int i;
        struct dev_context *devc;
-       struct scope_config *model;
+       const struct scope_config *model;
        struct scope_state *state;
 
        if (!sdi || !(devc = sdi->priv))
@@ -322,7 +321,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
        unsigned int i, j;
        char float_str[30];
        struct dev_context *devc;
-       struct scope_config *model;
+       const struct scope_config *model;
        struct scope_state *state;
        const char *tmp;
        uint64_t p, q;
@@ -474,7 +473,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
 {
        int cg_type = CG_NONE;
        struct dev_context *devc = NULL;
-       struct scope_config *model = NULL;
+       const struct scope_config *model = NULL;
 
        if (sdi && (devc = sdi->priv)) {
                if ((cg_type = check_channel_group(devc, cg)) == CG_INVALID)
@@ -572,7 +571,7 @@ static int dlm_setup_channels(const struct sr_dev_inst *sdi)
        unsigned int i;
        gboolean *pod_enabled, setup_changed;
        struct scope_state *state;
-       struct scope_config *model;
+       const struct scope_config *model;
        struct sr_channel *ch;
        struct dev_context *devc;
        struct sr_scpi_dev_inst *scpi;