projects
/
libam7xxx.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
am7xxx: track the context in am7xxx_device
[libam7xxx.git]
/
src
/
am7xxx.c
diff --git
a/src/am7xxx.c
b/src/am7xxx.c
index
1ece881
..
20b0ddf
100644
(file)
--- 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];
struct _am7xxx_device {
libusb_device_handle *usb_device;
uint8_t buffer[AM7XXX_HEADER_WIRE_SIZE];
+ am7xxx_context *ctx;
am7xxx_device *next;
};
am7xxx_device *next;
};
@@
-340,6
+341,8
@@
static am7xxx_device *add_new_device(am7xxx_context *ctx)
}
memset(new_device, 0, sizeof(*new_device));
}
memset(new_device, 0, sizeof(*new_device));
+ new_device->ctx = ctx;
+
if (*devices_list == NULL) {
*devices_list = new_device;
} else {
if (*devices_list == NULL) {
*devices_list = new_device;
} else {