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;
}
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;
}
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;
}
switch (hwcap) {
/* TODO */
default:
- SR_ERR("Unknown hardware capability: %d.", hwcap);
+ sr_err("Unknown hardware capability: %d.", hwcap);
ret = SR_ERR_ARG;
}
/* Message logging helpers with driver-specific prefix string. */
#define DRIVER_LOG_DOMAIN "${short}: "
-#define SR_LOG(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
-#define SR_SPEW(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
-#define SR_DBG(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
-#define SR_INFO(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
-#define SR_WARN(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
-#define SR_ERR(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
+#define sr_log(l, s, args...) sr_log(l, DRIVER_LOG_DOMAIN s, ## args)
+#define sr_spew(s, args...) sr_spew(DRIVER_LOG_DOMAIN s, ## args)
+#define sr_dbg(s, args...) sr_dbg(DRIVER_LOG_DOMAIN s, ## args)
+#define sr_info(s, args...) sr_info(DRIVER_LOG_DOMAIN s, ## args)
+#define sr_warn(s, args...) sr_warn(DRIVER_LOG_DOMAIN s, ## args)
+#define sr_err(s, args...) sr_err(DRIVER_LOG_DOMAIN s, ## args)
/** Private, per-device-instance driver context. */
struct dev_context {