]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/appa-55ii/api.c
Drop unneeded std_session_send_df_header() comments.
[libsigrok.git] / src / hardware / appa-55ii / api.c
index 27c29e92bcb5ade67184665238394d4a4f834ed2..86f78543cd686b47a2ed54991fead49a70053aa4 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"
 
@@ -86,7 +87,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
        sr_info("Probing serial port %s.", conn);
 
-       drvc = di->priv;
+       drvc = di->context;
        drvc->instances = NULL;
        serial_flush(serial);
 
@@ -122,7 +123,7 @@ scan_cleanup:
 
 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 cleanup(const struct sr_dev_driver *di)
@@ -174,11 +175,9 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
        switch (key) {
        case SR_CONF_LIMIT_SAMPLES:
                devc->limit_samples = g_variant_get_uint64(data);
-               sr_dbg("Setting sample limit to %" PRIu64 ".", devc->limit_samples);
                break;
        case SR_CONF_LIMIT_MSEC:
                devc->limit_msec = g_variant_get_uint64(data);
-               sr_dbg("Setting time limit to %" PRIu64 "ms.", devc->limit_msec);
                break;
        case SR_CONF_DATA_SOURCE: {
                tmp_str = g_variant_get_string(data, NULL);
@@ -201,7 +200,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
 static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
                const struct sr_channel_group *cg)
 {
-       (void)sdi;
        (void)cg;
 
        switch (key) {
@@ -252,7 +250,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
        devc->num_samples = 0;
        devc->start_time = g_get_monotonic_time();
 
-       /* Send header packet to the session bus. */
        std_session_send_df_header(cb_data, LOG_PREFIX);
 
        /* Poll every 50ms, or whenever some data comes in. */
@@ -284,5 +281,5 @@ SR_PRIV struct sr_dev_driver appa_55ii_driver_info = {
        .dev_close = std_serial_dev_close,
        .dev_acquisition_start = dev_acquisition_start,
        .dev_acquisition_stop = dev_acquisition_stop,
-       .priv = NULL,
+       .context = NULL,
 };