X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Fzeroplus-logic-cube%2Fapi.c;h=dd001495828f3147ae5ca08f6ae8934b70a272ba;hb=e32862ebccac5ae063abc68d9ce13a66ad46bb97;hp=32c868996ee2ec3676cf7a439191b8cc1a919b94;hpb=1f8f5bc08e0f684156baac513431b40d79ab4ea1;p=libsigrok.git diff --git a/src/hardware/zeroplus-logic-cube/api.c b/src/hardware/zeroplus-logic-cube/api.c index 32c86899..dd001495 100644 --- a/src/hardware/zeroplus-logic-cube/api.c +++ b/src/hardware/zeroplus-logic-cube/api.c @@ -79,8 +79,6 @@ static const char *channel_names[] = { "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", }; -SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info; - /* * The hardware supports more samplerates than these, but these are the * options hardcoded into the vendor's Windows GUI. @@ -155,11 +153,6 @@ SR_PRIV int zp_set_samplerate(struct dev_context *devc, uint64_t samplerate) return SR_OK; } -static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) -{ - return std_init(di, sr_ctx, LOG_PREFIX); -} - static GSList *scan(struct sr_dev_driver *di, GSList *options) { struct sr_dev_inst *sdi; @@ -385,10 +378,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd if (sdi->status != SR_ST_ACTIVE) return SR_ERR_DEV_CLOSED; - if (!(devc = sdi->priv)) { - sr_err("%s: sdi->priv was NULL", __func__); - return SR_ERR_ARG; - } + devc = sdi->priv; switch (key) { case SR_CONF_SAMPLERATE: @@ -669,7 +659,7 @@ SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info = { .name = "zeroplus-logic-cube", .longname = "ZEROPLUS Logic Cube LAP-C series", .api_version = 1, - .init = init, + .init = std_init, .cleanup = std_cleanup, .scan = scan, .dev_list = std_dev_list,