Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/main.c

    r398c4d7 r7e752b2  
    197197}
    198198
    199 static int assign_driver_fibril(void *arg)
    200 {
    201         node_t *node = (node_t *) arg;
    202         assign_driver(node, &drivers_list, &device_tree);
    203         return EOK;
    204 }
    205 
    206199/** Handle child device registration.
    207200 *
     
    244237       
    245238        devman_receive_match_ids(match_count, &node->match_ids);
    246 
    247         /*
    248          * Try to find suitable driver and assign it to the device.
    249          * We do not want to block current fibril that is used to processing
    250          * incoming calls: we will launch a separate fibril to handle
    251          * the driver assigning. That is because assign_driver can actually
    252          * include task spawning which could take some time.
    253          */
    254         fid_t assign_fibril = fibril_create(assign_driver_fibril, node);
    255         if (assign_fibril == 0) {
    256                 /*
    257                  * Fallback in case we are out of memory.
    258                  * Probably not needed as we will die soon anyway ;-).
    259                  */
    260                 (void) assign_driver_fibril(node);
    261         } else {
    262                 fibril_add_ready(assign_fibril);
    263         }
    264 
     239       
    265240        /* Return device handle to parent's driver. */
    266241        ipc_answer_1(callid, EOK, node->handle);
     242       
     243        /* Try to find suitable driver and assign it to the device. */
     244        assign_driver(node, &drivers_list, &device_tree);
    267245}
    268246
     
    319297        printf(NAME ": device '%s' added to class '%s', class name '%s' was "
    320298            "asigned to it\n", dev->pathname, class_name, class_info->dev_name);
    321 
     299       
    322300        ipc_answer_0(callid, EOK);
    323301}
Note: See TracChangeset for help on using the changeset viewer.