]> sigrok.org Git - libsigrok.git/blobdiff - hwdriver.c
sr: remove unused argument from hardware driver function init()
[libsigrok.git] / hwdriver.c
index f56c3d3c060f2e3828612cc11049e57a0c23b704..7a9e7e668f7a1c0086818cd56e1ff262f7df6ec0 100644 (file)
@@ -23,8 +23,8 @@
 #include <dirent.h>
 #include <string.h>
 #include <glib.h>
-#include "sigrok.h"
-#include "sigrok-internal.h"
+#include "libsigrok.h"
+#include "libsigrok-internal.h"
 
 /*
  * This enumerates which driver capabilities correspond to user-settable
@@ -45,6 +45,9 @@ SR_API struct sr_hwcap_option sr_hwcap_options[] = {
        {SR_HWCAP_FILTER, SR_T_CHAR, "Filter targets", "filter"},
        {SR_HWCAP_VDIV, SR_T_RATIONAL_VOLT, "Volts/div", "vdiv"},
        {SR_HWCAP_COUPLING, SR_T_CHAR, "Coupling", "coupling"},
+       {SR_HWCAP_MODEL, SR_T_KEYVALUE, "Model", "model"},
+       {SR_HWCAP_CONN, SR_T_CHAR, "Connection", "connect"},
+       {SR_HWCAP_SERIALCOMM, SR_T_CHAR, "Serial communication", "serialcomm"},
        {0, 0, NULL, NULL},
 };
 
@@ -75,6 +78,9 @@ extern SR_PRIV struct sr_dev_driver fx2lafw_driver_info;
 #ifdef HAVE_HW_HANTEK_DSO
 extern SR_PRIV struct sr_dev_driver hantek_dso_driver_info;
 #endif
+#ifdef HAVE_HW_GENERICDMM
+extern SR_PRIV struct sr_dev_driver genericdmm_driver_info;
+#endif
 
 static struct sr_dev_driver *drivers_list[] = {
 #ifdef HAVE_LA_DEMO
@@ -103,6 +109,9 @@ static struct sr_dev_driver *drivers_list[] = {
 #endif
 #ifdef HAVE_HW_HANTEK_DSO
        &hantek_dso_driver_info,
+#endif
+#ifdef HAVE_HW_GENERICDMM
+       &genericdmm_driver_info,
 #endif
        NULL,
 };
@@ -135,7 +144,7 @@ SR_API int sr_driver_init(struct sr_dev_driver *driver)
        char **probe_names;
 
        sr_dbg("initializing %s driver", driver->name);
-       num_devs = driver->init(NULL);
+       num_devs = driver->init();
        for (i = 0; i < num_devs; i++) {
                num_probes = GPOINTER_TO_INT(
                                driver->dev_info_get(i, SR_DI_NUM_PROBES));
@@ -228,7 +237,7 @@ SR_PRIV struct sr_usb_dev_inst *sr_usb_dev_inst_new(uint8_t bus,
 
        udi->bus = bus;
        udi->address = address;
-       udi->devhdl = hdl; /* TODO: Check if this is NULL? */
+       udi->devhdl = hdl;
 
        return udi;
 }