Ignore:
File:
1 edited

Legend:

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

    rad22fa4 r56fd7cf  
    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
    96107        int rc;
    97108
     
    103114
    104115        ddf_fun_t *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);
     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);
    116118        if (rc != EOK) {
    117119                usb_log_fatal("Failed to create root hub: %s.\n",
    118120                    str_error(rc));
    119                 ddf_fun_destroy(hub_dev);
    120121        }
    121122
Note: See TracChangeset for help on using the changeset viewer.