Changeset 15d0046 in mainline for uspace/drv/bus/usb/vhc/hub.c


Ignore:
Timestamp:
2014-09-12T13:22:33Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b20126
Parents:
8db09e4 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    r8db09e4 r15d0046  
    9494{
    9595        ddf_fun_t *hc_dev = (ddf_fun_t *) arg;
    96 
    97         /*
    98          * Wait until parent device is properly initialized.
    99          */
    100         async_sess_t *sess;
    101         do {
    102                 sess = devman_device_connect(EXCHANGE_SERIALIZE,
    103                     ddf_fun_get_handle(hc_dev), 0);
    104         } while (!sess);
    105         async_hangup(sess);
    106 
    10796        int rc;
    10897
     
    114103
    115104        ddf_fun_t *hub_dev;
    116         rc = usb_hc_new_device_wrapper(ddf_fun_get_dev(hc_dev), &hc_conn, USB_SPEED_FULL,
    117             pretend_port_rest, NULL, NULL, &rh_ops, hc_dev, &hub_dev);
     105
     106        hub_dev = ddf_fun_create(ddf_fun_get_dev(hc_dev), fun_inner, NULL);
     107        if (hub_dev == NULL) {
     108                rc = ENOMEM;
     109                usb_log_fatal("Failed to create root hub: %s.\n",
     110                    str_error(rc));
     111                return rc;
     112        }
     113
     114        rc = usb_hc_new_device_wrapper(ddf_fun_get_dev(hc_dev), hub_dev,
     115            &hc_conn, USB_SPEED_FULL, pretend_port_rest, NULL, NULL, &rh_ops);
    118116        if (rc != EOK) {
    119117                usb_log_fatal("Failed to create root hub: %s.\n",
    120118                    str_error(rc));
     119                ddf_fun_destroy(hub_dev);
    121120        }
    122121
Note: See TracChangeset for help on using the changeset viewer.