]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/ikalogic-scanaplus/api.c
clear_helper(): Use a cast to shorten all implementations.
[libsigrok.git] / src / hardware / ikalogic-scanaplus / api.c
index dd5d09ffef51342acb8a26a7af226387c2859310..e9c6af04c22f04c8a1b0436e6fafd5d0d7b058e8 100644 (file)
@@ -43,12 +43,8 @@ static const char *channel_names[] = {
 /* Note: The IKALOGIC ScanaPLUS always samples at 100MHz. */
 static const uint64_t samplerates[1] = { SR_MHZ(100) };
 
-static void clear_helper(void *priv)
+static void clear_helper(struct dev_context *devc)
 {
-       struct dev_context *devc;
-
-       devc = priv;
-
        ftdi_free(devc->ftdic);
        g_free(devc->compressed_buf);
        g_free(devc->sample_buf);
@@ -56,7 +52,7 @@ static void clear_helper(void *priv)
 
 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)