]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/pipistrello-ols/protocol.c
Pass driver struct pointer to driver callbacks.
[libsigrok.git] / src / hardware / pipistrello-ols / protocol.c
index 1d0c9f208839200ee97c5de38fc66d479b55f187..f3bd15b0272d9c290d89f4c3af9d0438c508cd84 100644 (file)
@@ -20,7 +20,6 @@
 #include "protocol.h"
 
 extern SR_PRIV struct sr_dev_driver p_ols_driver_info;
-static struct sr_dev_driver *di = &p_ols_driver_info;
 
 SR_PRIV int write_shortcommand(struct dev_context *devc, uint8_t command)
 {
@@ -227,7 +226,7 @@ SR_PRIV struct sr_dev_inst *p_ols_get_metadata(uint8_t *buf, int bytes_read, str
 
        sdi = g_malloc0(sizeof(struct sr_dev_inst));
        sdi->status = SR_ST_INACTIVE;
-       sdi->driver = di;
+       sdi->driver = &p_ols_driver_info;
        sdi->priv = devc;
 
        devname = g_string_new("");