Changes in uspace/drv/bus/usb/vhc/main.c [0c0f823b:920d0fc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/main.c
r0c0f823b r920d0fc 67 67 } 68 68 69 vhc_data_t *data = malloc(sizeof(vhc_data_t));69 vhc_data_t *data = ddf_dev_data_alloc(dev, sizeof(vhc_data_t)); 70 70 if (data == NULL) { 71 71 usb_log_fatal("Failed to allocate memory.\n"); … … 89 89 } 90 90 91 hc->ops = &vhc_ops;91 ddf_fun_set_ops(hc, &vhc_ops); 92 92 list_initialize(&data->devices); 93 93 fibril_mutex_initialize(&data->guard); 94 94 data->hub = &virtual_hub_device; 95 95 data->hc_fun = hc; 96 97 dev->driver_data = data;98 96 99 97 rc = ddf_fun_bind(hc); … … 116 114 117 115 usb_log_info("Virtual USB host controller ready (dev %zu, hc %zu).\n", 118 (size_t) dev->handle, (size_t) hc->handle); 119 120 116 (size_t) ddf_dev_get_handle(dev), (size_t) ddf_fun_get_handle(hc)); 121 117 122 118 rc = vhc_virtdev_plug_hub(data, data->hub, NULL); … … 142 138 int main(int argc, char * argv[]) 143 139 { 144 usb_log_enable(USB_LOG_LEVEL_DEFAULT,NAME);140 log_init(NAME); 145 141 146 142 printf(NAME ": virtual USB host controller driver.\n");
Note:
See TracChangeset
for help on using the changeset viewer.