Changes in uspace/drv/bus/usb/vhc/hub/virthub.c [1da979d:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/hub/virthub.c
r1da979d r9d58539 34 34 */ 35 35 #include <usb/classes/classes.h> 36 #include <usb/classes/hub.h>37 36 #include <usbvirt/device.h> 38 37 #include <assert.h> 39 38 #include <errno.h> 40 39 #include <str_error.h> 41 #include <stdio.h>42 40 #include <assert.h> 43 41 #include <stdlib.h> … … 78 76 .type = USB_DESCTYPE_HUB, 79 77 .port_count = HUB_PORT_COUNT, 80 .characteristics = HUB_CHAR_NO_POWER_SWITCH_FLAG | HUB_CHAR_NO_OC_FLAG,78 .characteristics = 0, 81 79 .power_on_warm_up = 50, /* Huh? */ 82 80 .max_current = 100, /* Huh again. */ … … 99 97 .length = sizeof(usb_standard_configuration_descriptor_t), 100 98 .descriptor_type = USB_DESCTYPE_CONFIGURATION, 101 .total_length = 99 .total_length = 102 100 sizeof(usb_standard_configuration_descriptor_t) 103 101 + sizeof(std_interface_descriptor) … … 147 145 * @return Error code. 148 146 */ 149 int virthub_init(usbvirt_device_t *dev , const char* name)147 int virthub_init(usbvirt_device_t *dev) 150 148 { 151 149 if (dev == NULL) { … … 154 152 dev->ops = &hub_ops; 155 153 dev->descriptors = &descriptors; 156 dev->address = 0;157 dev->name = str_dup(name);158 if (!dev->name)159 return ENOMEM;160 154 161 155 hub_t *hub = malloc(sizeof(hub_t)); 162 156 if (hub == NULL) { 163 free(dev->name);164 157 return ENOMEM; 165 158 }
Note:
See TracChangeset
for help on using the changeset viewer.