]> sigrok.org Git - sigrok-util.git/blobdiff - source/drv-api.c
new-driver: Include config.h first in template sources
[sigrok-util.git] / source / drv-api.c
index e356ed13192cd98e0fa969718a527a3db5fa02b2..824027f962c9c265746ea73e96e736fa4c6c9fea 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include "protocol.h"
 
 SR_PRIV struct sr_dev_driver ${lib}_driver_info;
@@ -34,7 +35,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        (void)options;
 
        devices = NULL;
-       drvc = di->priv;
+       drvc = di->context;
        drvc->instances = NULL;
 
        /* TODO: scan for devices, either based on a SR_CONF_CONN option
@@ -45,7 +46,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
 static GSList *dev_list(const struct sr_dev_driver *di)
 {
-       return ((struct drv_context *)(di->priv))->instances;
+       return ((struct drv_context *)(di->context))->instances;
 }
 
 static int dev_clear(const struct sr_dev_driver *di)
@@ -186,5 +187,5 @@ SR_PRIV struct sr_dev_driver ${lib}_driver_info = {
        .dev_close = dev_close,
        .dev_acquisition_start = dev_acquisition_start,
        .dev_acquisition_stop = dev_acquisition_stop,
-       .priv = NULL,
+       .context = NULL,
 };