Changeset 0d6915f in mainline


Ignore:
Timestamp:
2010-11-26T13:57:51Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ca16307, b12d3cc
Parents:
cc70d57
Message:

device_t has parent set when in the same driver

Location:
uspace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    rcc70d57 r0d6915f  
    164164       
    165165        devman_handle_t dev_handle =  IPC_GET_ARG1(*icall);
     166        devman_handle_t parent_dev_handle = IPC_GET_ARG2(*icall);
     167   
    166168        device_t *dev = create_device();
    167169        dev->handle = dev_handle;
     
    171173       
    172174        add_to_devices_list(dev);
     175        dev->parent = driver_get_device(&devices, parent_dev_handle);
     176       
    173177        res = driver->driver_ops->add_device(dev);
    174178        if (0 == res) {
  • uspace/srv/devman/devman.c

    rcc70d57 r0d6915f  
    643643       
    644644        /* Send the device to the driver. */
    645         aid_t req = async_send_1(phone, DRIVER_ADD_DEVICE, node->handle,
    646             &answer);
     645        devman_handle_t parent_handle;
     646        if (node->parent) {
     647                parent_handle = node->parent->handle;
     648        } else {
     649                parent_handle = 0;
     650        }
     651        aid_t req = async_send_2(phone, DRIVER_ADD_DEVICE, node->handle,
     652            parent_handle, &answer);
    647653       
    648654        /* Send the device's name to the driver. */
Note: See TracChangeset for help on using the changeset viewer.