]> sigrok.org Git - libsigrok.git/commitdiff
hantek-dso: scan/info_get fixes
authorBert Vermeulen <redacted>
Sun, 15 Jul 2012 02:08:21 +0000 (04:08 +0200)
committerBert Vermeulen <redacted>
Fri, 3 Aug 2012 08:27:39 +0000 (10:27 +0200)
hardware/hantek-dso/api.c

index ebb4edc2e9cde85aab6a507df6c53696a9e631c1..f38c80d7b68a6da27abb5363edb567218ed08e84 100644 (file)
@@ -157,6 +157,7 @@ static struct sr_dev_inst *dso_dev_new(int index, const struct dso_profile *prof
                prof->vendor, prof->model, NULL);
        if (!sdi)
                return NULL;
+       sdi->driver = hdi;
 
        if (!(ctx = g_try_malloc0(sizeof(struct context)))) {
                sr_err("hantek-dso: ctx malloc failed");
@@ -423,6 +424,8 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_CUR_SAMPLERATE:
                *data = &tmp;
                break;
+       default:
+               return SR_ERR_ARG;
        }
 
        return SR_OK;