Lines Matching defs:new_device
738 struct darwin_cached_device *new_device;
763 list_for_each_entry(new_device, &darwin_cached_devices, list, struct darwin_cached_device) {
764 usbi_dbg("matching sessionID 0x%x against cached device with sessionID 0x%x", sessionID, new_device->session);
765 if (new_device->session == sessionID) {
767 *cached_out = new_device;
783 new_device = calloc (1, sizeof (*new_device));
784 if (!new_device) {
790 list_add(&new_device->list, &darwin_cached_devices);
792 (*device)->GetDeviceAddress (device, (USBDeviceAddress *)&new_device->address);
795 darwin_ref_cached_device(new_device);
797 new_device->device = device;
798 new_device->session = sessionID;
799 (*device)->GetLocationID (device, &new_device->location);
800 new_device->port = port;
801 new_device->parent_session = parent_sessionID;
804 ret = darwin_cache_device_descriptor(ctx, new_device);
808 if (new_device->can_enumerate) {
809 snprintf(new_device->sys_path, 20, "%03i-%04x-%04x-%02x-%02x", new_device->address,
810 new_device->dev_descriptor.idVendor, new_device->dev_descriptor.idProduct,
811 new_device->dev_descriptor.bDeviceClass, new_device->dev_descriptor.bDeviceSubClass);
820 *cached_out = new_device;