]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/sysclk-lwla/protocol.c
drivers: Load firmware via new resource API
[libsigrok.git] / src / hardware / sysclk-lwla / protocol.c
index 1c9bca885e08f3af60949aa8f807d1003331015b..5891af4f4296fd2503634e7e3fc55ec0c647a3ed 100644 (file)
@@ -748,10 +748,12 @@ SR_PRIV int lwla_init_device(const struct sr_dev_inst *sdi)
 SR_PRIV int lwla_set_clock_config(const struct sr_dev_inst *sdi)
 {
        struct dev_context *devc;
+       struct drv_context *drvc;
        int ret;
        enum clock_config choice;
 
        devc = sdi->priv;
+       drvc = sdi->driver->context;
 
        if (sdi->status == SR_ST_INACTIVE)
                choice = CONF_CLOCK_NONE;
@@ -764,7 +766,8 @@ SR_PRIV int lwla_set_clock_config(const struct sr_dev_inst *sdi)
 
        if (choice != devc->cur_clock_config) {
                devc->cur_clock_config = CONF_CLOCK_NONE;
-               ret = lwla_send_bitstream(sdi->conn, bitstream_map[choice]);
+               ret = lwla_send_bitstream(drvc->sr_ctx, sdi->conn,
+                                         bitstream_map[choice]);
                if (ret == SR_OK)
                        devc->cur_clock_config = choice;
                return ret;