]> sigrok.org Git - libsigrok.git/blobdiff - hardware/tondaj-sl-814/api.c
Get rid of obsolete SR_DI_NUM_PROBES and SR_DI_PROBE_NAMES.
[libsigrok.git] / hardware / tondaj-sl-814 / api.c
index 8962437069de2147ee8b55816148faa1802ac058..28e9bc853e5ca947a2dc91205bde661ccaef820f 100644 (file)
@@ -39,11 +39,6 @@ static const int hwcaps[] = {
        0,
 };
 
-static const char *probe_names[] = {
-       "P1",
-       NULL,
-};
-
 SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info;
 static struct sr_dev_driver *di = &tondaj_sl_814_driver_info;
 
@@ -82,6 +77,7 @@ static int hw_init(struct sr_context *sr_ctx)
                return SR_ERR_MALLOC;
        }
 
+       drvc->sr_ctx = sr_ctx;
        di->priv = drvc;
 
        return SR_OK;
@@ -119,10 +115,8 @@ static GSList *hw_scan(GSList *options)
                        break;
                }
        }
-       if (!conn) {
-               sr_dbg("Couldn't determine connection options.");
+       if (!conn)
                return NULL;
-       }
        if (!serialcomm)
                serialcomm = SERIALCOMM;
 
@@ -145,7 +139,7 @@ static GSList *hw_scan(GSList *options)
 
        sdi->priv = devc;
        sdi->driver = di;
-       probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, probe_names[0]);
+       probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1");
        if (!probe) {
                sr_err("Failed to create probe.");
                return NULL;
@@ -213,12 +207,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(1);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        default:
                sr_err("Unknown info_id: %d.", info_id);
                return SR_ERR_ARG;