]> sigrok.org Git - libsigrok.git/blobdiff - device.c
asix-sigma: use driver struct-based device instance list
[libsigrok.git] / device.c
index 15809e17e9625e6fbffd6a115a6c7212dd71b93d..fb8d60b28a5c3ad6dd20123a15120ba3c9bbdc28 100644 (file)
--- a/device.c
+++ b/device.c
@@ -19,8 +19,8 @@
 
 #include <stdio.h>
 #include <glib.h>
-#include "sigrok.h"
-#include "sigrok-internal.h"
+#include "libsigrok.h"
+#include "libsigrok-internal.h"
 
 static GSList *devs = NULL;
 
@@ -397,7 +397,8 @@ SR_API gboolean sr_dev_has_hwcap(const struct sr_dev *dev, int hwcap)
 
        /* TODO: Sanity check on 'hwcap'. */
 
-       if (!(hwcaps = dev->driver->hwcap_get_all())) {
+       if (dev->driver->info_get(SR_DI_HWCAPS,
+                       (const void **)&hwcaps, NULL) != SR_OK) {
                sr_err("dev: %s: dev has no capabilities", __func__);
                return FALSE;
        }