]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/baylibre-acme/api.c
drivers: Random SR_CONF_LIMIT_* cleanups.
[libsigrok.git] / src / hardware / baylibre-acme / api.c
index 4438c64274516df43a4650bf5ed1976caa8d3eda..b824720ded820a5e3fd354c13ce3be833a29e934 100644 (file)
@@ -132,8 +132,7 @@ err_out:
 }
 
 static int config_get(uint32_t key, GVariant **data,
-                     const struct sr_dev_inst *sdi,
-                     const struct sr_channel_group *cg)
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
        int ret;
@@ -173,8 +172,7 @@ static int config_get(uint32_t key, GVariant **data,
 }
 
 static int config_set(uint32_t key, GVariant *data,
-                     const struct sr_dev_inst *sdi,
-                     const struct sr_channel_group *cg)
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
        uint64_t samplerate;
@@ -216,8 +214,7 @@ static int config_set(uint32_t key, GVariant *data,
 }
 
 static int config_list(uint32_t key, GVariant **data,
-                      const struct sr_dev_inst *sdi,
-                      const struct sr_channel_group *cg)
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        uint32_t devopts_cg[MAX_DEVOPTS_CG];
        int num_devopts_cg = 0;
@@ -227,7 +224,7 @@ static int config_list(uint32_t key, GVariant **data,
                case SR_CONF_DEVICE_OPTIONS:
                        return STD_CONFIG_LIST(key, data, sdi, cg, NULL, drvopts, devopts);
                case SR_CONF_SAMPLERATE:
-                       *data = std_gvar_samplerates_steps(samplerates, ARRAY_SIZE(samplerates));
+                       *data = std_gvar_samplerates_steps(ARRAY_AND_SIZE(samplerates));
                        break;
                default:
                        return SR_ERR_NA;