]> sigrok.org Git - libsigrok.git/commitdiff
uni-t-dmm: Use std_dev_clear().
authorUwe Hermann <redacted>
Fri, 10 May 2013 16:59:46 +0000 (18:59 +0200)
committerUwe Hermann <redacted>
Fri, 10 May 2013 16:59:46 +0000 (18:59 +0200)
hardware/uni-t-dmm/api.c

index 5ffc6594d872e93be827438911c568a121549c88..6f2cb69c941d33ce78c35a2c97b16e74e3e45157 100644 (file)
@@ -91,11 +91,7 @@ SR_PRIV struct dmm_info udmms[] = {
 
 static int clear_instances(int dmm)
 {
-       (void)dmm;
-
-       /* TODO: Use common code later. */
-
-       return SR_OK;
+       return std_dev_clear(udmms[dmm].di, NULL);
 }
 
 static int hw_init(struct sr_context *sr_ctx, int dmm)
@@ -200,9 +196,7 @@ static int hw_dev_close(struct sr_dev_inst *sdi)
 
 static int hw_cleanup(int dmm)
 {
-       clear_instances(dmm);
-
-       return SR_OK;
+       return clear_instances(dmm);
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)