]> sigrok.org Git - libsigrok.git/blobdiff - hardware/fx2lafw/fx2lafw.c
Add a struct sr_context * parameter to hw_init()
[libsigrok.git] / hardware / fx2lafw / fx2lafw.c
index e74312fb77b8a745d770bd007f7fafed4c7e03d6..c82cef8742d95fd5bf4ff1e16bb305dbc2730d50 100644 (file)
@@ -143,8 +143,7 @@ static struct sr_dev_driver *fdi = &fx2lafw_driver_info;
 static int hw_dev_close(struct sr_dev_inst *sdi);
 static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
                const void *value);
-static int hw_dev_acquisition_stop(const struct sr_dev_inst *sdi,
-               void *cb_data);
+static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data);
 
 /**
  * Check the USB configuration to determine if this is an fx2lafw device.
@@ -400,7 +399,7 @@ static int clear_instances(void)
  * API callbacks
  */
 
-static int hw_init(void)
+static int hw_init(struct sr_context *sr_ctx)
 {
        struct drv_context *drvc;
 
@@ -432,8 +431,8 @@ static GSList *hw_scan(GSList *options)
        libusb_device **devlist;
        int devcnt, num_logic_probes, ret, i, j;
 
-       /* Avoid compiler warnings. */
        (void)options;
+
        drvc = fdi->priv;
 
        /* This scan always invalidates any previous scans. */
@@ -687,7 +686,6 @@ static int receive_data(int fd, int revents, void *cb_data)
 {
        struct timeval tv;
 
-       /* Avoid compiler warnings. */
        (void)fd;
        (void)revents;
        (void)cb_data;
@@ -1027,11 +1025,8 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi,
 }
 
 /* TODO: This stops acquisition on ALL devices, ignoring dev_index. */
-static int hw_dev_acquisition_stop(const struct sr_dev_inst *sdi,
-               void *cb_data)
+static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
 {
-
-       /* Avoid compiler warnings. */
        (void)cb_data;
 
        abort_acquisition(sdi->priv);