]> sigrok.org Git - sigrok-util.git/blobdiff - source/drv-api.c
new-driver: Add missing "${lib}_" in api.c.
[sigrok-util.git] / source / drv-api.c
index 16f5f6d2e74f9a6870e58ef6ddeab2f32f77fa3a..dbeea02fc826207e771ed104d85f84228202362c 100644 (file)
@@ -22,7 +22,7 @@
 #include "libsigrok-internal.h"
 #include "protocol.h"
 
-SR_PRIV struct sr_dev_driver driver_info;
+SR_PRIV struct sr_dev_driver ${lib}_driver_info;
 static struct sr_dev_driver *di = &${lib}_driver_info;
 
 /* Properly close and free all devices. */
@@ -56,7 +56,7 @@ static int hw_init(void)
        struct drv_context *drvc;
 
        if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) {
-               SR_ERR("Driver context malloc failed.");
+               sr_err("Driver context malloc failed.");
                return SR_ERR;
        }
 
@@ -121,7 +121,7 @@ static int hw_info_get(int info_id, const void **data,
        switch (info_id) {
        /* TODO */
        default:
-               SR_ERR("Unknown info_id: %d.", info_id);
+               sr_err("Unknown info_id: %d.", info_id);
                return SR_ERR_ARG;
        }
 
@@ -134,7 +134,7 @@ static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
        int ret;
 
        if (sdi->status != SR_ST_ACTIVE) {
-               SR_ERR("Device inactive, can't set config options.");
+               sr_err("Device inactive, can't set config options.");
                return SR_ERR;
        }
 
@@ -142,7 +142,7 @@ static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
        switch (hwcap) {
        /* TODO */
        default:
-               SR_ERR("Unknown hardware capability: %d.", hwcap);
+               sr_err("Unknown hardware capability: %d.", hwcap);
                ret = SR_ERR_ARG;
        }