]> sigrok.org Git - libsigrok.git/blobdiff - src/std.c
std_init(): Drop check if pass in driver is non-NULL
[libsigrok.git] / src / std.c
index 8f6f3786339472dd06136ceab46368ea3a0e0764..a03e509c732b4c0693ef6ee69638bffa9acc236a 100644 (file)
--- a/src/std.c
+++ b/src/std.c
  *
  * @param di The driver instance to use.
  * @param sr_ctx The libsigrok context to assign.
- * @param[in] prefix A driver-specific prefix string used for log messages.
  *
  * @return SR_OK upon success, SR_ERR_ARG upon invalid arguments.
  */
-SR_PRIV int std_init(struct sr_dev_driver *di, struct sr_context *sr_ctx,
-                    const char *prefix)
+SR_PRIV int std_init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
 {
        struct drv_context *drvc;
 
-       if (!di) {
-               sr_err("%s: Invalid driver, cannot initialize.", prefix);
-               return SR_ERR_ARG;
-       }
-
        drvc = g_malloc0(sizeof(struct drv_context));
        drvc->sr_ctx = sr_ctx;
        drvc->instances = NULL;