Changeset 96646a6 in mainline for uspace/lib/usbdev/src/devdrv.c


Ignore:
Timestamp:
2011-10-12T15:49:35Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8e5ce07
Parents:
1a4ea01d
Message:

libusbdev: device remove and gone skeleton callbacks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/devdrv.c

    r1a4ea01d r96646a6  
    4242
    4343static int generic_device_add(ddf_dev_t *);
     44static int generic_device_remove(ddf_dev_t *);
     45static int generic_device_gone(ddf_dev_t *);
    4446
    4547static driver_ops_t generic_driver_ops = {
    46         .add_device = generic_device_add
     48        .add_device = generic_device_add,
     49        .dev_remove = generic_device_remove,
     50        .dev_gone = generic_device_gone,
    4751};
    4852static driver_t generic_driver = {
     
    150154        return driver->ops->device_add(dev);
    151155}
    152 
     156/*----------------------------------------------------------------------------*/
     157int generic_device_remove(ddf_dev_t *gen_dev)
     158{
     159        assert(driver);
     160        assert(driver->ops);
     161        if (driver->ops->device_rem == NULL)
     162                return ENOTSUP;
     163
     164        return ENOTSUP;
     165}
     166/*----------------------------------------------------------------------------*/
     167int generic_device_gone(ddf_dev_t *gen_dev)
     168{
     169        assert(driver);
     170        assert(driver->ops);
     171        assert(driver->ops->device_gone);
     172
     173        return ENOTSUP;
     174}
     175/*----------------------------------------------------------------------------*/
    153176/** Destroy existing pipes of a USB device.
    154177 *
Note: See TracChangeset for help on using the changeset viewer.