]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/baylibre-acme/api.c
Put driver pointers into special section
[libsigrok.git] / src / hardware / baylibre-acme / api.c
index 9103aeb15a1482d4fd14df89410b9d7496f9289c..1d83228c8b1baa9654a9210198c71ec53478f443 100644 (file)
@@ -22,8 +22,6 @@
 #include <time.h>
 #include <sys/timerfd.h>
 
-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(di, sr_ctx);
-}
-
 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);