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

usbhid: unbind generic hid DDF function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/generic/hiddev.c

    raf8c9b54 rc5b6db53  
    190190/*----------------------------------------------------------------------------*/
    191191
    192 static int usb_generic_hid_create_function(usb_hid_dev_t *hid_dev)
    193 {       
     192void usb_generic_hid_deinit(usb_hid_dev_t *hid_dev, void *data)
     193{
     194        ddf_fun_t *fun = data;
     195        const int ret = ddf_fun_unbind(fun);
     196        if (ret != EOK) {
     197                usb_log_error("ailed to unbind generic hid fun.\n");
     198                return;
     199        }
     200        ddf_fun_destroy(fun);
     201}
     202
     203/*----------------------------------------------------------------------------*/
     204
     205int usb_generic_hid_init(usb_hid_dev_t *hid_dev, void **data)
     206{
     207        if (hid_dev == NULL) {
     208                return EINVAL;
     209        }
     210
    194211        /* Create the exposed function. */
    195212        /** @todo Generate numbers for the devices? */
     
    214231
    215232        usb_log_debug("HID function created. Handle: %" PRIun "\n", fun->handle);
    216 
    217         return EOK;
    218 }
    219 
    220 /*----------------------------------------------------------------------------*/
    221 
    222 int usb_generic_hid_init(usb_hid_dev_t *hid_dev, void **data)
    223 {
    224         if (hid_dev == NULL) {
    225                 return EINVAL;
    226         }
    227 
    228         return usb_generic_hid_create_function(hid_dev);
     233        *data = fun;
     234
     235        return EOK;
    229236}
    230237
Note: See TracChangeset for help on using the changeset viewer.