X-Git-Url: https://git.ao2.it/libam7xxx.git/blobdiff_plain/8116c40f687d89cbcd521e2268a3a084b9280dfe..3dcf58dc4693136812e4b3ccba3b0f726c1bf3d2:/src/am7xxx.c diff --git a/src/am7xxx.c b/src/am7xxx.c index 1ece881..20b0ddf 100644 --- a/src/am7xxx.c +++ b/src/am7xxx.c @@ -55,6 +55,7 @@ static struct am7xxx_usb_device_descriptor supported_devices[] = { struct _am7xxx_device { libusb_device_handle *usb_device; uint8_t buffer[AM7XXX_HEADER_WIRE_SIZE]; + am7xxx_context *ctx; am7xxx_device *next; }; @@ -340,6 +341,8 @@ static am7xxx_device *add_new_device(am7xxx_context *ctx) } memset(new_device, 0, sizeof(*new_device)); + new_device->ctx = ctx; + if (*devices_list == NULL) { *devices_list = new_device; } else {