]> sigrok.org Git - sigrok-util.git/commitdiff
new-driver: hw_init() now takes a context.
authorUwe Hermann <redacted>
Sun, 30 Dec 2012 00:45:08 +0000 (01:45 +0100)
committerUwe Hermann <redacted>
Sun, 30 Dec 2012 00:45:08 +0000 (01:45 +0100)
source/drv-api.c

index 2750a7996212587460a4c472cdf162a2d8864201..fee866e9840ecf6e91eb91f55dbcd41f2d84a01d 100644 (file)
@@ -53,7 +53,7 @@ static int clear_instances(void)
        return SR_OK;
 }
 
-static int hw_init(void)
+static int hw_init(struct sr_context *sr_ctx)
 {
        struct drv_context *drvc;
 
@@ -64,6 +64,7 @@ static int hw_init(void)
 
        /* TODO */
 
+       drvc->sr_ctx = sr_ctx;
        di->priv = drvc;
 
        return SR_OK;