]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hp-3457a/api.c
std_init(): Drop check if pass in driver is non-NULL
[libsigrok.git] / src / hardware / hp-3457a / api.c
index 19188e39d9b1e3fd6b4ec2785df257ac7c41c361..2d05f29a89375a8fd3fa99b27afa2b9404c04438 100644 (file)
@@ -31,7 +31,7 @@ static const uint32_t drvopts[] = {
 };
 
 static const uint32_t devopts[] = {
-       SR_CONF_CONTINUOUS | SR_CONF_SET,
+       SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
        SR_CONF_MEASURED_QUANTITY | SR_CONF_SET,
        SR_CONF_ADC_POWERLINE_CYCLES | SR_CONF_SET | SR_CONF_GET,
@@ -168,7 +168,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
 
 static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
 {
-       return std_init(sr_ctx, di, LOG_PREFIX);
+       return std_init(di, sr_ctx);
 }
 
 static GSList *scan(struct sr_dev_driver *di, GSList *options)
@@ -176,16 +176,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        return sr_scpi_scan(di->context, options, probe_device);
 }
 
-static GSList *dev_list(const struct sr_dev_driver *di)
-{
-       return ((struct drv_context *)(di->context))->instances;
-}
-
-static int dev_clear(const struct sr_dev_driver *di)
-{
-       return std_dev_clear(di, NULL);
-}
-
 /*
  * We need to set the HP 3457A to a known state, and there are quite a number
  * of knobs to tweak. Here's a brief explanation of what's going on. For more
@@ -459,8 +449,7 @@ SR_PRIV struct sr_dev_driver hp_3457a_driver_info = {
        .init = init,
        .cleanup = std_cleanup,
        .scan = scan,
-       .dev_list = dev_list,
-       .dev_clear = dev_clear,
+       .dev_list = std_dev_list,
        .config_get = config_get,
        .config_set = config_set,
        .config_list = config_list,