X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fbaylibre-acme%2Fapi.c;h=1d83228c8b1baa9654a9210198c71ec53478f443;hb=dd5c48a6d567a3cac62c4b0058588273bbeea171;hp=a556449c67654824a0e89d8935589db53799d91f;hpb=d54a7c42ac6540d90e99e5138c945d789e3dac6f;p=libsigrok.git diff --git a/src/hardware/baylibre-acme/api.c b/src/hardware/baylibre-acme/api.c index a556449c..1d83228c 100644 --- a/src/hardware/baylibre-acme/api.c +++ b/src/hardware/baylibre-acme/api.c @@ -22,8 +22,6 @@ #include #include -SR_PRIV struct sr_dev_driver baylibre_acme_driver_info; - static const uint32_t devopts[] = { SR_CONF_CONTINUOUS, SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, @@ -53,11 +51,6 @@ static const uint64_t samplerates[] = { SR_HZ(1), }; -static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) -{ - return std_init(sr_ctx, di, LOG_PREFIX); -} - static GSList *scan(struct sr_dev_driver *di, GSList *options) { struct drv_context *drvc; @@ -393,11 +386,11 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) return SR_OK; } -SR_PRIV struct sr_dev_driver baylibre_acme_driver_info = { +static struct sr_dev_driver baylibre_acme_driver_info = { .name = "baylibre-acme", .longname = "BayLibre ACME (Another Cute Measurement Equipment)", .api_version = 1, - .init = init, + .init = std_init, .cleanup = std_cleanup, .scan = scan, .dev_list = std_dev_list, @@ -410,3 +403,4 @@ SR_PRIV struct sr_dev_driver baylibre_acme_driver_info = { .dev_acquisition_stop = dev_acquisition_stop, .context = NULL, }; +SR_REGISTER_DEV_DRIVER(baylibre_acme_driver_info);