]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-6xxx/api.c
clear_helper(): Use a cast to shorten all implementations.
[libsigrok.git] / src / hardware / hantek-6xxx / api.c
index aa0977ad3cbbc457bf56ff20325bf5a80c7bfb0e..6bdcdb1f9dc7b24485e648e63001c69163c60538 100644 (file)
@@ -156,17 +156,14 @@ static int configure_channels(const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
 {
-       struct dev_context *devc;
-
-       devc = priv;
        g_slist_free(devc->enabled_channels);
 }
 
 static int dev_clear(const struct sr_dev_driver *di)
 {
-       return std_dev_clear_with_callback(di, clear_helper);
+       return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
 }
 
 static GSList *scan(struct sr_dev_driver *di, GSList *options)