Changes in uspace/drv/bus/usb/vhc/hub/virthub.c [58563585:1558d85] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/hub/virthub.c
r58563585 r1558d85 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>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.