]> sigrok.org Git - libsigrok.git/blobdiff - device.c
sr/cli/gtk/qt: s/get_dev_info/dev_info_get/.
[libsigrok.git] / device.c
index cd9668ec033a3c035784f316ee9ad801d2101ba6..9cc3b6800691b4debd76555b8b572bb1d20486b7 100644 (file)
--- a/device.c
+++ b/device.c
@@ -374,7 +374,7 @@ SR_API int sr_dev_trigger_set(struct sr_dev *dev, int probenum,
  */
 SR_API gboolean sr_dev_has_hwcap(const struct sr_dev *dev, int hwcap)
 {
-       int *capabilities, i;
+       int *hwcaps, i;
 
        if (!dev) {
                sr_err("dev: %s: dev was NULL", __func__);
@@ -388,13 +388,13 @@ SR_API gboolean sr_dev_has_hwcap(const struct sr_dev *dev, int hwcap)
 
        /* TODO: Sanity check on 'hwcap'. */
 
-       if (!(capabilities = dev->plugin->get_capabilities())) {
+       if (!(hwcaps = dev->plugin->hwcap_get_all())) {
                sr_err("dev: %s: dev has no capabilities", __func__);
                return FALSE; /* TODO: SR_ERR*. */
        }
 
-       for (i = 0; capabilities[i]; i++) {
-               if (capabilities[i] != hwcap)
+       for (i = 0; hwcaps[i]; i++) {
+               if (hwcaps[i] != hwcap)
                        continue;
                sr_spew("dev: %s: found hwcap %d", __func__, hwcap);
                return TRUE;
@@ -424,7 +424,7 @@ SR_API int sr_dev_info_get(const struct sr_dev *dev, int id, const void **data)
        if (data == NULL)
                return SR_ERR_ARG;
 
-       *data = dev->plugin->get_dev_info(dev->plugin_index, id);
+       *data = dev->plugin->dev_info_get(dev->plugin_index, id);
 
        if (*data == NULL)
                return SR_ERR;