Changeset f5f0cfb in mainline for uspace/drv/bus/usb/vhc/hub/virthub.c


Ignore:
Timestamp:
2012-12-22T16:24:28Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1e2af6a9
Parents:
f6577d9
Message:

vhc: Remove single instance limitation.

Embed hub vitrul device instead of using global instance.

File:
1 edited

Legend:

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

    rf6577d9 rf5f0cfb  
    146146 * @return Error code.
    147147 */
    148 int virthub_init(usbvirt_device_t *dev)
     148int virthub_init(usbvirt_device_t *dev, const char* name)
    149149{
    150150        if (dev == NULL) {
     
    153153        dev->ops = &hub_ops;
    154154        dev->descriptors = &descriptors;
     155        dev->address = 0;
     156        dev->name = str_dup(name);
     157        if (!name)
     158                return ENOMEM;
    155159
    156160        hub_t *hub = malloc(sizeof(hub_t));
    157161        if (hub == NULL) {
     162                free(dev->name);
    158163                return ENOMEM;
    159164        }
Note: See TracChangeset for help on using the changeset viewer.