]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/cem-dt-885x/api.c
Drop unneeded std_session_send_df_header() comments.
[libsigrok.git] / src / hardware / cem-dt-885x / api.c
index 5ae4e37ca67b9a4b5ec918e8a8e18aefe0184bd9..ff2edb1292c07e2e862f0b2b5f5e29c29e4fb754 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <string.h>
 #include "protocol.h"
 
@@ -102,7 +103,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                return NULL;
 
        devices = NULL;
-       drvc = di->priv;
+       drvc = di->context;
        start = g_get_monotonic_time();
        while (g_get_monotonic_time() - start < MAX_SCAN_TIME_US) {
                if (serial_read_nonblocking(serial, &c, 1) == 1 && c == 0xa5) {
@@ -137,7 +138,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
 static GSList *dev_list(const struct sr_dev_driver *di)
 {
-       return ((struct drv_context *)(di->priv))->instances;
+       return ((struct drv_context *)(di->context))->instances;
 }
 
 static int dev_open(struct sr_dev_inst *sdi)
@@ -349,6 +350,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
                case SR_CONF_DEVICE_OPTIONS:
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
                                        devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
+                       break;
                case SR_CONF_SPL_WEIGHT_FREQ:
                        *data = g_variant_new_strv(weight_freq, ARRAY_SIZE(weight_freq));
                        break;
@@ -394,7 +396,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
        devc->num_samples = 0;
        devc->buf_len = 0;
 
-       /* Send header packet to the session bus. */
        std_session_send_df_header(cb_data, LOG_PREFIX);
 
        /* Poll every 100ms, or whenever some data comes in. */
@@ -430,5 +431,5 @@ SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info = {
        .dev_close = std_serial_dev_close,
        .dev_acquisition_start = dev_acquisition_start,
        .dev_acquisition_stop = dev_acquisition_stop,
-       .priv = NULL,
+       .context = NULL,
 };