Changes in uspace/drv/bus/usb/usbmid/usbmid.c [56fd7cf:317a463] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmid/usbmid.c
r56fd7cf r317a463 30 30 * @{ 31 31 */ 32 33 /* XXX Fix this */34 #define _DDF_DATA_IMPLANT35 36 32 /** 37 33 * @file … … 51 47 static int usb_iface_get_interface_impl(ddf_fun_t *fun, int *iface_no) 52 48 { 53 usbmid_interface_t *iface = ddf_fun_data_get(fun); 49 assert(fun); 50 51 usbmid_interface_t *iface = fun->driver_data; 54 52 assert(iface); 55 53 … … 125 123 } 126 124 127 match_id_list_t match_ids;128 init_match_ids(&match_ids);129 130 125 rc = usb_device_create_match_ids_from_interface(device_descriptor, 131 interface_descriptor, & match_ids);126 interface_descriptor, &child->match_ids); 132 127 if (rc != EOK) { 133 128 ddf_fun_destroy(child); 134 129 return rc; 135 130 } 136 137 list_foreach(match_ids.ids, link) {138 match_id_t *match_id = list_get_instance(link, match_id_t, link);139 rc = ddf_fun_add_match_id(child, match_id->id, match_id->score);140 if (rc != EOK) {141 clean_match_ids(&match_ids);142 ddf_fun_destroy(child);143 return rc;144 }145 }146 clean_match_ids(&match_ids);147 131 148 132 rc = ddf_fun_bind(child); … … 154 138 155 139 iface->fun = child; 156 ddf_fun_data_implant(child, iface);157 ddf_fun_set_ops(child, &child_device_ops);140 child->driver_data = iface; 141 child->ops = &child_device_ops; 158 142 159 143 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.