Changes in uspace/drv/bus/usb/vhc/hub/virthub.c [58563585:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified uspace/drv/bus/usb/vhc/hub/virthub.c ¶
r58563585 r9d58539 33 33 * @brief 34 34 */ 35 36 35 #include <usb/classes/classes.h> 37 #include <usb/classes/hub.h>38 36 #include <usbvirt/device.h> 39 37 #include <assert.h> 40 38 #include <errno.h> 41 39 #include <str_error.h> 42 #include < stdio.h>40 #include <assert.h> 43 41 #include <stdlib.h> 44 42 #include <ddf/driver.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.