]> sigrok.org Git - libsigrok.git/blobdiff - hardware/alsa/alsa.c
sr: rename all sr_device_instance_* functions to sr_dev_inst_*
[libsigrok.git] / hardware / alsa / alsa.c
index 3d3067ce664804c7806e5f73032061c337d6e24b..d4ee7bb163510698b38180cc50553429d3e9c2b1 100644 (file)
@@ -77,7 +77,7 @@ static int hw_init(const char *deviceinfo)
                return 0;
        }
 
-       sdi = sr_device_instance_new(0, SR_ST_ACTIVE, "alsa", NULL, NULL);
+       sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, "alsa", NULL, NULL);
        if (!sdi)
                goto free_alsa;
 
@@ -97,7 +97,7 @@ static int hw_opendev(int device_index)
        struct alsa *alsa;
        int err;
 
-       if (!(sdi = sr_get_device_instance(device_instances, device_index)))
+       if (!(sdi = sr_get_dev_inst(device_instances, device_index)))
                return SR_ERR;
        alsa = sdi->priv;
 
@@ -131,7 +131,7 @@ static int hw_closedev(int device_index)
        struct sr_device_instance *sdi;
        struct alsa *alsa;
 
-       if (!(sdi = sr_get_device_instance(device_instances, device_index))) {
+       if (!(sdi = sr_get_dev_inst(device_instances, device_index))) {
                sr_err("alsa: %s: sdi was NULL", __func__);
                return SR_ERR; /* TODO: SR_ERR_ARG? */
        }
@@ -154,13 +154,13 @@ static int hw_cleanup(void)
 {
        struct sr_device_instance *sdi;
 
-       if (!(sdi = sr_get_device_instance(device_instances, 0))) {
+       if (!(sdi = sr_get_dev_inst(device_instances, 0))) {
                sr_err("alsa: %s: sdi was NULL", __func__);
                return SR_ERR_BUG;
        }
 
        g_free(sdi->priv);
-       sr_device_instance_free(sdi);
+       sr_dev_inst_free(sdi);
 
        return SR_OK;
 }
@@ -171,7 +171,7 @@ static void *hw_get_device_info(int device_index, int device_info_id)
        struct alsa *alsa;
        void *info = NULL;
 
-       if (!(sdi = sr_get_device_instance(device_instances, device_index)))
+       if (!(sdi = sr_get_dev_inst(device_instances, device_index)))
                return NULL;
        alsa = sdi->priv;
 
@@ -214,7 +214,7 @@ static int hw_set_configuration(int device_index, int capability, void *value)
        struct sr_device_instance *sdi;
        struct alsa *alsa;
 
-       if (!(sdi = sr_get_device_instance(device_instances, device_index)))
+       if (!(sdi = sr_get_dev_inst(device_instances, device_index)))
                return SR_ERR;
        alsa = sdi->priv;
 
@@ -300,7 +300,7 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
        int count;
        int err;
 
-       if (!(sdi = sr_get_device_instance(device_instances, device_index)))
+       if (!(sdi = sr_get_dev_inst(device_instances, device_index)))
                return SR_ERR;
        alsa = sdi->priv;