X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsysclk-lwla%2Fapi.c;h=6cd38a13a05a41891401ff60d13dc3636585d0fa;hb=53279f13e4694fcf2aba314baade418941b0bc3e;hp=8373a0eb1a83e1a5043d312a056270bfebb9a1bb;hpb=f778bf02eaf0d7fa7ccb91a0da8a68233f1fb79a;p=libsigrok.git diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c index 8373a0eb..6cd38a13 100644 --- a/src/hardware/sysclk-lwla/api.c +++ b/src/hardware/sysclk-lwla/api.c @@ -203,9 +203,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) return std_scan_complete(di, devices); } -/* Destroy the private device context. - */ -static void clear_dev_context(void *priv) +static void clear_helper(void *priv) { struct dev_context *devc; @@ -215,16 +213,13 @@ static void clear_dev_context(void *priv) sr_err("Cannot clear device context during acquisition!"); return; /* Leak and pray. */ } - sr_dbg("Device context cleared."); g_free(devc); } -/* Destroy all device instances. - */ static int dev_clear(const struct sr_dev_driver *di) { - return std_dev_clear_with_callback(di, &clear_dev_context); + return std_dev_clear_with_callback(di, clear_helper); } /* Drain any pending data from the USB transfer buffers on the device.