X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fopenbench-logic-sniffer%2Fapi.c;h=e61bd10d394e034bc97fcb951b2663b3ed8ce0a4;hb=e57057aee778e723da572a6b5e2bd01526cc7beb;hp=4abc929a24b0824673303971afe92cc45b3b2e4f;hpb=41812aca436805b0614f2a8f31cf2f8ce494aea0;p=libsigrok.git
diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c
index 4abc929a..e61bd10d 100644
--- a/src/hardware/openbench-logic-sniffer/api.c
+++ b/src/hardware/openbench-logic-sniffer/api.c
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-#include
+#include
#include "protocol.h"
#define SERIALCOMM "115200/8n1"
@@ -97,7 +97,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
struct sr_config *src;
struct sr_dev_inst *sdi;
struct drv_context *drvc;
- struct dev_context *devc;
struct sr_serial_dev_inst *serial;
GSList *l, *devices;
int ret;
@@ -182,7 +181,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
if (sp_input_waiting(serial->data) != 0) {
/* Got metadata. */
sdi = get_metadata(serial);
- devc = sdi->priv;
} else {
/* Not an OLS -- some other board that uses the sump protocol. */
sr_info("Device does not support metadata.");
@@ -195,8 +193,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
for (i = 0; i < ARRAY_SIZE(ols_channel_names); i++)
sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE,
ols_channel_names[i]);
- devc = ols_dev_new();
- sdi->priv = devc;
+ sdi->priv = ols_dev_new();
}
/* Configure samplerate and divider. */
if (ols_set_samplerate(sdi, DEFAULT_SAMPLERATE) != SR_OK)