From: Bert Vermeulen Date: Sat, 14 Jul 2012 13:49:30 +0000 (+0200) Subject: demo: use new scan API X-Git-Tag: dsupstream~810 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=067d07166b8637a4146058b4fb4da2d628b34c37;p=libsigrok.git demo: use new scan API --- diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index cdd4d1d3..8f7bfb29 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -149,9 +149,13 @@ static int hw_init(void) return SR_OK; } -static int hw_scan(void) +static GSList *hw_scan(GSList *options) { struct sr_dev_inst *sdi; + GSList *devices; + + (void)options; + devices = NULL; sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, DEMONAME, NULL, NULL); if (!sdi) { @@ -159,9 +163,10 @@ static int hw_scan(void) return 0; } + devices = g_slist_append(devices, sdi); ddi->instances = g_slist_append(ddi->instances, sdi); - return 1; + return devices; } static int hw_dev_open(int dev_index)