X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Funi-t-ut32x%2Fprotocol.c;h=34fa14d4c2f726b339da203a9bd302bb36e601e9;hp=14e70cf221ed13f9d41adf1082098ce215f8648e;hb=695dc859c15ba4190f5c1aa2e1a6e2dc6a6e5845;hpb=208c1d35435626a11afa1ab301b2071b2a4e187b diff --git a/src/hardware/uni-t-ut32x/protocol.c b/src/hardware/uni-t-ut32x/protocol.c index 14e70cf2..34fa14d4 100644 --- a/src/hardware/uni-t-ut32x/protocol.c +++ b/src/hardware/uni-t-ut32x/protocol.c @@ -130,7 +130,7 @@ static void process_packet(struct sr_dev_inst *sdi) analog.data = &temp; packet.type = SR_DF_ANALOG_OLD; packet.payload = &analog; - sr_session_send(devc->cb_data, &packet); + sr_session_send(sdi, &packet); g_slist_free(analog.channels); } } @@ -140,8 +140,7 @@ static void process_packet(struct sr_dev_inst *sdi) * memory slots come through as "----" measurements. */ devc->num_samples++; if (devc->limit_samples && devc->num_samples >= devc->limit_samples) { - sdi->driver->dev_acquisition_stop((struct sr_dev_inst *)sdi, - devc->cb_data); + sdi->driver->dev_acquisition_stop(sdi); } } @@ -218,7 +217,7 @@ SR_PRIV int uni_t_ut32x_handle_events(int fd, int revents, void *cb_data) if (sdi->status == SR_ST_STOPPING) { usb_source_remove(sdi->session, drvc->sr_ctx); - std_session_send_df_header(cb_data, LOG_PREFIX); + std_session_send_df_header(sdi, LOG_PREFIX); /* Tell the device to stop sending USB packets. */ usb = sdi->conn;