]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/atten-pps3xxx/api.c
Simplify a few config_set() callbacks.
[libsigrok.git] / src / hardware / atten-pps3xxx / api.c
index 359121f0e69b0d783fbda15ad22de12615775fb9..e0168b4ebc62fa6099965cf403380e1eb897540d 100644 (file)
@@ -60,7 +60,7 @@ static const char *channel_modes[] = {
        "Parallel",
 };
 
-static struct pps_model models[] = {
+static const struct pps_model models[] = {
        { PPS_3203T_3S, "PPS3203T-3S",
                CHANMODE_INDEPENDENT | CHANMODE_SERIES | CHANMODE_PARALLEL,
                3,
@@ -75,7 +75,6 @@ static struct pps_model models[] = {
        },
 };
 
-
 SR_PRIV struct sr_dev_driver atten_pps3203_driver_info;
 
 static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
@@ -93,7 +92,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options, int modelid)
        struct sr_channel_group *cg;
        struct sr_serial_dev_inst *serial;
        GSList *l, *devices;
-       struct pps_model *model;
+       const struct pps_model *model;
        uint8_t packet[PACKET_SIZE];
        unsigned int i;
        int delay_ms, ret;
@@ -359,7 +358,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
                }
        }
 
-
        return ret;
 }