X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fbeaglelogic%2Fapi.c;h=1c8e43b84f55f722142b356547b367cd926a2fe4;hb=de285cce11aca3afd0d4adfdd514c691e6a71c64;hp=5f1d35fc1716f88172024d0795d1d464461c232b;hpb=98fec29ecbb5093856b69311be8e937c162edded;p=libsigrok.git
diff --git a/src/hardware/beaglelogic/api.c b/src/hardware/beaglelogic/api.c
index 5f1d35fc..1c8e43b8 100644
--- a/src/hardware/beaglelogic/api.c
+++ b/src/hardware/beaglelogic/api.c
@@ -17,6 +17,7 @@
* along with this program. If not, see .
*/
+#include
#include "protocol.h"
#include "beaglelogic.h"
@@ -87,7 +88,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
int i, maxch;
devices = NULL;
- drvc = di->priv;
+ drvc = di->context;
drvc->instances = NULL;
/* Probe for /dev/beaglelogic */
@@ -146,7 +147,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)
@@ -165,6 +166,7 @@ static int dev_open(struct sr_dev_inst *sdi)
/* Set fd and local attributes */
devc->pollfd.fd = devc->fd;
devc->pollfd.events = G_IO_IN;
+ devc->pollfd.revents = 0;
/* Get the default attributes */
beaglelogic_get_samplerate(devc);
@@ -205,7 +207,7 @@ static int cleanup(const struct sr_dev_driver *di)
GSList *l;
/* unused driver */
- if (!(drvc = di->priv))
+ if (!(drvc = di->context))
return SR_OK;
/* Clean up the instances */
@@ -422,5 +424,5 @@ SR_PRIV struct sr_dev_driver beaglelogic_driver_info = {
.dev_close = dev_close,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = dev_acquisition_stop,
- .priv = NULL,
+ .context = NULL,
};