]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/link-mso19/protocol.c
sysclk-lwla: Remove global driver instance pointer
[libsigrok.git] / src / hardware / link-mso19 / protocol.c
index 148f0ba18933fd80ec26bd2ee171be379e582097..69551fe0f8244360ae7a3ebac6787f26ae568695 100644 (file)
@@ -19,6 +19,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include "protocol.h"
 
 /* serial protocol */
@@ -198,7 +199,7 @@ SR_PRIV int mso_dac_out(const struct sr_dev_inst *sdi, uint16_t val)
        return mso_send_control_message(devc->serial, ARRAY_AND_SIZE(ops));
 }
 
-SR_PRIV inline uint16_t mso_calc_raw_from_mv(struct dev_context * devc)
+SR_PRIV uint16_t mso_calc_raw_from_mv(struct dev_context *devc)
 {
        return (uint16_t) (0x200 -
                           ((devc->dso_trigger_voltage / devc->dso_probe_attn) /
@@ -357,7 +358,7 @@ SR_PRIV int mso_receive_data(int fd, int revents, void *cb_data)
        GSList *l;
        int i;
 
-       struct drv_context *drvc = di->priv;
+       struct drv_context *drvc = di->context;
 
        /* Find this device's devc struct by its fd. */
        struct dev_context *devc = NULL;