Changeset a56a13c in mainline


Ignore:
Timestamp:
2011-12-12T12:35:50Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d02834c
Parents:
dbb7e3b
Message:

libusb: Make devman function wrapper inline.

Location:
uspace/lib/usb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/hc.h

    rdbb7e3b ra56a13c  
    109109}
    110110
    111 int usb_ddf_get_hc_handle_by_sid(service_id_t, devman_handle_t *);
     111/** Get host controller handle by its class index.
     112 *
     113 * @param sid Service ID of the HC function.
     114 * @param hc_handle Where to store the HC handle
     115 *      (can be NULL for existence test only).
     116 * @return Error code.
     117 */
     118static inline int usb_ddf_get_hc_handle_by_sid(
     119    service_id_t sid, devman_handle_t *handle)
     120{
     121        devman_handle_t h;
     122        return devman_fun_sid_to_handle(sid, handle ? handle : &h);
     123}
    112124
    113125#endif
  • uspace/lib/usb/src/hc.c

    rdbb7e3b ra56a13c  
    257257        return ret;
    258258}
    259 /*----------------------------------------------------------------------------*/
    260 /** Get host controller handle by its class index.
    261  *
    262  * @param sid Service ID of the HC function.
    263  * @param hc_handle Where to store the HC handle
    264  *      (can be NULL for existence test only).
    265  * @return Error code.
    266  */
    267 int usb_ddf_get_hc_handle_by_sid(service_id_t sid, devman_handle_t *hc_handle)
    268 {
    269         devman_handle_t handle;
    270 
    271         const int ret = devman_fun_sid_to_handle(sid, &handle);
    272         if (ret == EOK && hc_handle != NULL)
    273                 *hc_handle = handle;
    274 
    275         return ret;
    276 }
    277259
    278260/**
Note: See TracChangeset for help on using the changeset viewer.