X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Fscpi-pps%2Fapi.c;h=c8070a063335538109aaa278ae96f4a112e9e7ae;hb=5e1b68c6e7567e0dcf7aff1307c3ffd4852cc15a;hp=b62574e2abbb02492e8305f8aaad18139c97efac;hpb=0af636bed97c174bea46e61e961eaa1b0b162e0f;p=libsigrok.git diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index b62574e2..c8070a06 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -30,9 +30,8 @@ static const uint32_t scanopts[] = { SR_CONF_SERIALCOMM, }; -static const uint32_t devopts_driver[] = { +static const uint32_t drvopts[] = { SR_CONF_POWER_SUPPLY, - SR_CONF_CONTINUOUS, }; static struct pps_channel_instance pci[] = { @@ -90,7 +89,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi) return NULL; } - sdi = sr_dev_inst_new(); + sdi = g_malloc0(sizeof(struct sr_dev_inst)); sdi->status = SR_ST_ACTIVE; sdi->vendor = g_strdup(vendor); sdi->model = g_strdup(hw_info->model); @@ -434,7 +433,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst * return SR_OK; } else if (key == SR_CONF_DEVICE_OPTIONS && !sdi) { *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, - devopts_driver, ARRAY_SIZE(devopts_driver), sizeof(uint32_t)); + drvopts, ARRAY_SIZE(drvopts), sizeof(uint32_t)); return SR_OK; }