]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/lascar-el-usb/api.c
Put driver pointers into special section
[libsigrok.git] / src / hardware / lascar-el-usb / api.c
index 78eab70500f84b2177e07d49e2ec0f959a4abc1d..1fd86b7ea00052975b12d3780283cff3b7fd3929 100644 (file)
@@ -24,8 +24,6 @@
 #include "libsigrok-internal.h"
 #include "protocol.h"
 
-SR_PRIV struct sr_dev_driver lascar_el_usb_driver_info;
-
 static const uint32_t scanopts[] = {
        SR_CONF_CONN,
 };
@@ -38,11 +36,6 @@ static const uint32_t devopts[] = {
        SR_CONF_DATALOG | SR_CONF_GET | SR_CONF_SET,
 };
 
-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;
@@ -420,7 +413,7 @@ SR_PRIV struct sr_dev_driver lascar_el_usb_driver_info = {
        .name = "lascar-el-usb",
        .longname = "Lascar EL-USB",
        .api_version = 1,
-       .init = init,
+       .init = std_init,
        .cleanup = std_cleanup,
        .scan = scan,
        .dev_list = std_dev_list,
@@ -434,3 +427,4 @@ SR_PRIV struct sr_dev_driver lascar_el_usb_driver_info = {
        .dev_acquisition_stop = dev_acquisition_stop,
        .context = NULL,
 };
+SR_REGISTER_DEV_DRIVER(lascar_el_usb_driver_info);