-/* Destroy the private device context.
- */
-static void clear_dev_context(void *priv)
-{
- struct dev_context *devc;
-
- devc = priv;
-
- if (devc->acquisition) {
- 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(di, &clear_dev_context);
-}
-