]> sigrok.org Git - libsigrok.git/blobdiff - hardware/demo/demo.c
sr/drivers: change driver dev_open/dev_close calls to use sdi
[libsigrok.git] / hardware / demo / demo.c
index e6e168fcc5c634b430e7d79207ec8a396f4e843a..cb2c15d9a36f974b963cef59299a3fcc27aa98a3 100644 (file)
@@ -170,20 +170,20 @@ static GSList *hw_scan(GSList *options)
        return devices;
 }
 
-static int hw_dev_open(int dev_index)
+static int hw_dev_open(struct sr_dev_inst *sdi)
 {
        /* Avoid compiler warnings. */
-       (void)dev_index;
+       (void)sdi;
 
        /* Nothing needed so far. */
 
        return SR_OK;
 }
 
-static int hw_dev_close(int dev_index)
+static int hw_dev_close(struct sr_dev_inst *sdi)
 {
        /* Avoid compiler warnings. */
-       (void)dev_index;
+       (void)sdi;
 
        /* Nothing needed so far. */
 
@@ -237,13 +237,13 @@ static int hw_dev_status_get(int dev_index)
        return SR_ST_ACTIVE;
 }
 
-static int hw_dev_config_set(int dev_index, int hwcap, const void *value)
+static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap,
+               const void *value)
 {
        int ret;
        const char *stropt;
 
-       /* Avoid compiler warnings. */
-       (void)dev_index;
+       (void)sdi;
 
        if (hwcap == SR_HWCAP_PROBECONFIG) {
                /* Nothing to do, but must be supported */