]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/demo/demo.c
Use driver name as the log prefix in standard functions
[libsigrok.git] / src / hardware / demo / demo.c
index fec9065a986504af681c660f4074c8196e5d9c17..288abef2b58be5885b17204c9f87297e9bc99f7f 100644 (file)
@@ -252,7 +252,6 @@ static void generate_analog_pattern(struct analog_gen *ag, uint64_t sample_rate)
 
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
 {
-       struct drv_context *drvc;
        struct dev_context *devc;
        struct sr_dev_inst *sdi;
        struct sr_channel *ch;
@@ -263,8 +262,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        int num_logic_channels, num_analog_channels, pattern, i;
        char channel_name[16];
 
-       drvc = di->context;
-
        num_logic_channels = DEFAULT_NUM_LOGIC_CHANNELS;
        num_analog_channels = DEFAULT_NUM_ANALOG_CHANNELS;
        for (l = options; l; l = l->next) {
@@ -853,7 +850,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        sr_session_source_add(sdi->session, -1, 0, 100,
                        prepare_data, (struct sr_dev_inst *)sdi);
 
-       std_session_send_df_header(sdi, LOG_PREFIX);
+       std_session_send_df_header(sdi);
 
        /* We use this timestamp to decide how many more samples to send. */
        devc->start_us = g_get_monotonic_time();
@@ -866,7 +863,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi)
 {
        sr_dbg("Stopping acquisition.");
        sr_session_source_remove(sdi->session, -1);
-       std_session_send_df_end(sdi, LOG_PREFIX);
+       std_session_send_df_end(sdi);
 
        return SR_OK;
 }