From 4ca38984459adfeaf6a94c2163be855fe41aec59 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Sat, 14 Jul 2012 12:45:07 +0200 Subject: [PATCH] zeroplus-logic-cube: use new scan API --- hardware/zeroplus-logic-cube/zeroplus.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index 162d084c..8e710089 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -336,14 +336,18 @@ static int hw_init(void) return SR_OK; } -static int hw_scan(void) +static GSList *hw_scan(GSList *options) { struct sr_dev_inst *sdi; struct libusb_device_descriptor des; + GSList *devices; libusb_device **devlist; int ret, devcnt, i; struct context *ctx; + (void)options; + devices = NULL; + /* Allocate memory for our private driver context. */ if (!(ctx = g_try_malloc(sizeof(struct context)))) { sr_err("zp: %s: ctx malloc failed", __func__); @@ -394,6 +398,7 @@ static int hw_scan(void) sdi->priv = ctx; + devices = g_slist_append(devices, sdi); zdi->instances = g_slist_append(zdi->instances, sdi); ctx->usb = sr_usb_dev_inst_new( libusb_get_bus_number(devlist[i]), @@ -403,7 +408,7 @@ static int hw_scan(void) } libusb_free_device_list(devlist, 1); - return devcnt; + return devices; } static int hw_dev_open(int dev_index)