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