]> sigrok.org Git - libsigrok.git/commitdiff
drivers: Drop some unneeded _names suffixes.
authorUwe Hermann <redacted>
Mon, 31 Jul 2017 06:20:25 +0000 (08:20 +0200)
committerUwe Hermann <redacted>
Mon, 31 Jul 2017 14:23:32 +0000 (16:23 +0200)
src/hardware/dreamsourcelab-dslogic/api.c
src/hardware/sysclk-lwla/api.c

index 7ea5f6eb32e7cc1b4ef73a7fa8a9bf0550130a2b..294e5d16ed7bc36755043cbd031d78dad64bf385 100644 (file)
@@ -67,7 +67,7 @@ static const uint32_t devopts[] = {
        SR_CONF_CLOCK_EDGE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
 };
 
-static const char *signal_edge_names[] = {
+static const char *signal_edges[] = {
        [DS_EDGE_RISING] = "rising",
        [DS_EDGE_FALLING] = "falling",
 };
@@ -428,9 +428,9 @@ static int config_get(uint32_t key, GVariant **data,
                break;
        case SR_CONF_CLOCK_EDGE:
                idx = devc->clock_edge;
-               if (idx >= (int)ARRAY_SIZE(signal_edge_names))
+               if (idx >= (int)ARRAY_SIZE(signal_edges))
                        return SR_ERR_BUG;
-               *data = g_variant_new_string(signal_edge_names[0]);
+               *data = g_variant_new_string(signal_edges[0]);
                break;
        default:
                return SR_ERR_NA;
@@ -483,7 +483,7 @@ static int config_set(uint32_t key, GVariant *data,
                devc->continuous_mode = g_variant_get_boolean(data);
                break;
        case SR_CONF_CLOCK_EDGE:
-               if ((idx = std_str_idx(data, ARRAY_AND_SIZE(signal_edge_names))) < 0)
+               if ((idx = std_str_idx(data, ARRAY_AND_SIZE(signal_edges))) < 0)
                        return SR_ERR_ARG;
                devc->clock_edge = idx;
                break;
@@ -515,7 +515,7 @@ static int config_list(uint32_t key, GVariant **data,
                *data = std_gvar_samplerates(devc->samplerates, devc->num_samplerates);
                break;
        case SR_CONF_CLOCK_EDGE:
-               *data = g_variant_new_strv(ARRAY_AND_SIZE(signal_edge_names));
+               *data = g_variant_new_strv(ARRAY_AND_SIZE(signal_edges));
                break;
        default:
                return SR_ERR_NA;
index 6055b83d4da6b6a46a65218c82918e7e75c6df43..93e54895e08ffd8352e7342f772e552fecd3df4d 100644 (file)
@@ -41,12 +41,12 @@ static const int32_t trigger_matches[] = {
        SR_TRIGGER_FALLING,
 };
 
-static const char *trigger_source_names[] = {
+static const char *trigger_sources[] = {
        [TRIGGER_CHANNELS] = "CH",
        [TRIGGER_EXT_TRG] = "TRG",
 };
 
-static const char *signal_edge_names[] = {
+static const char *signal_edges[] = {
        [EDGE_POSITIVE] = "r",
        [EDGE_NEGATIVE] = "f",
 };
@@ -358,21 +358,21 @@ static int config_get(uint32_t key, GVariant **data,
                break;
        case SR_CONF_CLOCK_EDGE:
                idx = devc->cfg_clock_edge;
-               if (idx >= ARRAY_SIZE(signal_edge_names))
+               if (idx >= ARRAY_SIZE(signal_edges))
                        return SR_ERR_BUG;
-               *data = g_variant_new_string(signal_edge_names[idx]);
+               *data = g_variant_new_string(signal_edges[idx]);
                break;
        case SR_CONF_TRIGGER_SOURCE:
                idx = devc->cfg_trigger_source;
-               if (idx >= ARRAY_SIZE(trigger_source_names))
+               if (idx >= ARRAY_SIZE(trigger_sources))
                        return SR_ERR_BUG;
-               *data = g_variant_new_string(trigger_source_names[idx]);
+               *data = g_variant_new_string(trigger_sources[idx]);
                break;
        case SR_CONF_TRIGGER_SLOPE:
                idx = devc->cfg_trigger_slope;
-               if (idx >= ARRAY_SIZE(signal_edge_names))
+               if (idx >= ARRAY_SIZE(signal_edges))
                        return SR_ERR_BUG;
-               *data = g_variant_new_string(signal_edge_names[idx]);
+               *data = g_variant_new_string(signal_edges[idx]);
                break;
        default:
                /* Must not happen for a key listed in devopts. */
@@ -427,17 +427,17 @@ static int config_set(uint32_t key, GVariant *data,
                        ? CLOCK_EXT_CLK : CLOCK_INTERNAL;
                break;
        case SR_CONF_CLOCK_EDGE:
-               if ((idx = std_str_idx(data, ARRAY_AND_SIZE(signal_edge_names))) < 0)
+               if ((idx = std_str_idx(data, ARRAY_AND_SIZE(signal_edges))) < 0)
                        return SR_ERR_ARG;
                devc->cfg_clock_edge = idx;
                break;
        case SR_CONF_TRIGGER_SOURCE:
-               if ((idx = std_str_idx(data, ARRAY_AND_SIZE(trigger_source_names))) < 0)
+               if ((idx = std_str_idx(data, ARRAY_AND_SIZE(trigger_sources))) < 0)
                        return SR_ERR_ARG;
                devc->cfg_trigger_source = idx;
                break;
        case SR_CONF_TRIGGER_SLOPE:
-               if ((idx = std_str_idx(data, ARRAY_AND_SIZE(signal_edge_names))) < 0)
+               if ((idx = std_str_idx(data, ARRAY_AND_SIZE(signal_edges))) < 0)
                        return SR_ERR_ARG;
                devc->cfg_trigger_slope = idx;
                break;
@@ -595,11 +595,11 @@ static int config_list(uint32_t key, GVariant **data,
                *data = std_gvar_array_i32(ARRAY_AND_SIZE(trigger_matches));
                break;
        case SR_CONF_TRIGGER_SOURCE:
-               *data = g_variant_new_strv(ARRAY_AND_SIZE(trigger_source_names));
+               *data = g_variant_new_strv(ARRAY_AND_SIZE(trigger_sources));
                break;
        case SR_CONF_TRIGGER_SLOPE:
        case SR_CONF_CLOCK_EDGE:
-               *data = g_variant_new_strv(ARRAY_AND_SIZE(signal_edge_names));
+               *data = g_variant_new_strv(ARRAY_AND_SIZE(signal_edges));
                break;
        default:
                /* Must not happen for a key listed in devopts. */