]> sigrok.org Git - libsigrok.git/blobdiff - hardware/link-mso19/link-mso19.c
sr: remove unused argument from hardware driver function init()
[libsigrok.git] / hardware / link-mso19 / link-mso19.c
index 30449e08265ec8e722c004be6bec4c5d909b2dc3..4b3d921839d1d3b4bd5615bcd7153addf89f3086 100644 (file)
@@ -28,8 +28,8 @@
 #include <glib.h>
 #include <libudev.h>
 #include <arpa/inet.h>
-#include "sigrok.h"
-#include "sigrok-internal.h"
+#include "libsigrok.h"
+#include "libsigrok-internal.h"
 #include "link-mso19.h"
 
 #define USB_VENDOR "3195"
@@ -65,7 +65,7 @@ static const char *probe_names[NUM_PROBES + 1] = {
        NULL,
 };
 
-static uint64_t supported_samplerates[] = {
+static const uint64_t supported_samplerates[] = {
        SR_HZ(100),
        SR_HZ(200),
        SR_HZ(500),
@@ -89,7 +89,7 @@ static uint64_t supported_samplerates[] = {
        0,
 };
 
-static struct sr_samplerates samplerates = {
+static const struct sr_samplerates samplerates = {
        0,
        0,
        0,
@@ -401,7 +401,7 @@ static int mso_parse_serial(const char *iSerial, const char *iProduct,
        return SR_OK;
 }
 
-static int hw_init(const char *devinfo)
+static int hw_init(void)
 {
        struct sr_dev_inst *sdi;
        int devcnt = 0;
@@ -410,8 +410,6 @@ static int hw_init(const char *devinfo)
        struct udev_list_entry *devs, *dev_list_entry;
        struct context *ctx;
 
-       devinfo = devinfo;
-
        /* It's easier to map usb<->serial using udev */
        /*
         * FIXME: On windows we can get the same information from the
@@ -655,7 +653,7 @@ static const int *hw_hwcap_get_all(void)
        return hwcaps;
 }
 
-static int hw_dev_config_set(int dev_index, int hwcap, void *value)
+static int hw_dev_config_set(int dev_index, int hwcap, const void *value)
 {
        struct sr_dev_inst *sdi;
 
@@ -664,7 +662,7 @@ static int hw_dev_config_set(int dev_index, int hwcap, void *value)
 
        switch (hwcap) {
        case SR_HWCAP_SAMPLERATE:
-               return mso_configure_rate(sdi, *(uint64_t *) value);
+               return mso_configure_rate(sdi, *(const uint64_t *) value);
        case SR_HWCAP_PROBECONFIG:
        case SR_HWCAP_LIMIT_SAMPLES:
        default: