]> sigrok.org Git - libsigrok.git/blobdiff - hardware/link-mso19/link-mso19.c
sr: Made hwcap const
[libsigrok.git] / hardware / link-mso19 / link-mso19.c
index 1993e073732f12647087129402fceb6c2a1dab6e..cce8d87c01d9019b2d97077986720a6c185619ba 100644 (file)
@@ -37,7 +37,7 @@
 
 #define NUM_PROBES 8
 
-static int hwcaps[] = {
+static const int hwcaps[] = {
        SR_HWCAP_LOGIC_ANALYZER,
 //     SR_HWCAP_OSCILLOSCOPE,
 //     SR_HWCAP_PAT_GENERATOR,
@@ -90,9 +90,9 @@ static uint64_t supported_samplerates[] = {
 };
 
 static struct sr_samplerates samplerates = {
-       SR_HZ(100),
-       SR_MHZ(200),
-       SR_HZ(0),
+       0,
+       0,
+       0,
        supported_samplerates,
 };
 
@@ -593,7 +593,7 @@ static int hw_dev_close(int dev_index)
 
        if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
                sr_err("mso19: %s: sdi was NULL", __func__);
-               return SR_ERR; /* TODO: SR_ERR_ARG? */
+               return SR_ERR_BUG;
        }
 
        /* TODO */
@@ -650,7 +650,7 @@ static int hw_dev_status_get(int dev_index)
        return sdi->status;
 }
 
-static int *hw_hwcap_get_all(void)
+static const int *hw_hwcap_get_all(void)
 {
        return hwcaps;
 }
@@ -691,7 +691,8 @@ static int receive_data(int fd, int revents, void *cb_data)
        double analog_out[1024];
        size_t i, s;
 
-       revents = revents;
+       /* Avoid compiler warnings. */
+       (void)revents;
 
        s = serial_read(fd, in, sizeof(in));
        if (s <= 0)