Ignore:
Timestamp:
2010-04-23T11:30:25Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5af21c5
Parents:
a78fa2a
Message:

added device states (usable, invalid, not present, not initialized); add_device driver callback method returns integer (errno) instead of bool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/drivers/rootia32/rootia32.c

    ra78fa2a rdf747b9c  
    5959} rootia32_child_dev_data_t;
    6060
    61 static bool rootia32_add_device(device_t *dev);
     61static int rootia32_add_device(device_t *dev);
    6262static bool rootia32_init();
    6363
     
    144144       
    145145        // register child  device
    146         if (!child_device_register(child, parent)) {
     146        if (EOK != child_device_register(child, parent)) {
    147147                goto failure;
    148148        }
     
    171171
    172172/** Get the root device.
     173 *
    173174 * @param dev the device which is root of the whole device tree (both of HW and pseudo devices).
    174  */
    175 static bool rootia32_add_device(device_t *dev)
     175 * @return 0 on success, negative error number otherwise.
     176 */
     177static int rootia32_add_device(device_t *dev)
    176178{
    177179        printf(NAME ": rootia32_add_device, device handle = %d\n", dev->handle);
     
    182184        }
    183185       
    184         return true;
     186        return EOK;
    185187}
    186188
Note: See TracChangeset for help on using the changeset viewer.