Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/vhc/hub/virthub.c

    r58563585 r1558d85  
    3333 * @brief
    3434 */
    35 
    3635#include <usb/classes/classes.h>
    37 #include <usb/classes/hub.h>
    3836#include <usbvirt/device.h>
    3937#include <assert.h>
    4038#include <errno.h>
    4139#include <str_error.h>
    42 #include <stdio.h>
    4340#include <stdlib.h>
    4441#include <ddf/driver.h>
     
    7875        .type = USB_DESCTYPE_HUB,
    7976        .port_count = HUB_PORT_COUNT,
    80         .characteristics = HUB_CHAR_NO_POWER_SWITCH_FLAG | HUB_CHAR_NO_OC_FLAG,
     77        .characteristics = 0,
    8178        .power_on_warm_up = 50, /* Huh? */
    8279        .max_current = 100, /* Huh again. */
     
    9996        .length = sizeof(usb_standard_configuration_descriptor_t),
    10097        .descriptor_type = USB_DESCTYPE_CONFIGURATION,
    101         .total_length =
     98        .total_length = 
    10299                sizeof(usb_standard_configuration_descriptor_t)
    103100                + sizeof(std_interface_descriptor)
     
    147144 * @return Error code.
    148145 */
    149 int virthub_init(usbvirt_device_t *dev, const char* name)
     146int virthub_init(usbvirt_device_t *dev)
    150147{
    151148        if (dev == NULL) {
     
    154151        dev->ops = &hub_ops;
    155152        dev->descriptors = &descriptors;
    156         dev->address = 0;
    157         dev->name = str_dup(name);
    158         if (!dev->name)
    159                 return ENOMEM;
    160153
    161154        hub_t *hub = malloc(sizeof(hub_t));
    162155        if (hub == NULL) {
    163                 free(dev->name);
    164156                return ENOMEM;
    165157        }
Note: See TracChangeset for help on using the changeset viewer.