Changeset 2745176 in mainline


Ignore:
Timestamp:
2013-01-27T15:48:12Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5debe97
Parents:
4ca778b
Message:

libusb: Hide/remove unused functions.

Location:
uspace/lib/usb
Files:
3 edited

Legend:

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

    r4ca778b r2745176  
    3838#include <usb/usb.h>
    3939
    40 int usb_get_info_by_handle(devman_handle_t,
    41     devman_handle_t *, usb_address_t *, int *);
    42 
    43 static inline int usb_get_hc_by_handle(devman_handle_t dev, devman_handle_t *hc)
    44 {
    45         return usb_get_info_by_handle(dev, hc, NULL, NULL);
    46 }
    47 
    48 static inline int usb_get_address_by_handle(
    49     devman_handle_t dev, usb_address_t *address)
    50 {
    51         return usb_get_info_by_handle(dev, NULL, address, NULL);
    52 }
    53 
    54 static inline int usb_get_iface_by_handle(devman_handle_t dev, int *iface)
    55 {
    56         return usb_get_info_by_handle(dev, NULL, NULL, iface);
    57 }
    58 
    5940int usb_resolve_device_handle(const char *, devman_handle_t *, usb_address_t *,
    6041    devman_handle_t *);
  • uspace/lib/usb/src/dev.c

    r4ca778b r2745176  
    4646 * @return Error code.
    4747 */
    48 int usb_get_info_by_handle(devman_handle_t device_handle,
     48static int usb_get_info_by_handle(devman_handle_t device_handle,
    4949    devman_handle_t *hc_handle, usb_address_t *address, int *iface)
    5050{
     
    111111
    112112        return EOK;
     113}
     114
     115static inline int usb_get_hc_by_handle(devman_handle_t dev, devman_handle_t *hc)
     116{
     117        return usb_get_info_by_handle(dev, hc, NULL, NULL);
     118}
     119
     120static inline int usb_get_address_by_handle(
     121    devman_handle_t dev, usb_address_t *address)
     122{
     123        return usb_get_info_by_handle(dev, NULL, address, NULL);
    113124}
    114125
  • uspace/lib/usb/src/hc.c

    r4ca778b r2745176  
    108108} else (void)0
    109109
    110 /** Initialize connection to USB host controller.
    111  *
    112  * @param connection Connection to be initialized.
    113  * @param device Device connecting to the host controller.
    114  * @return Error code.
    115  */
    116 int usb_hc_connection_initialize_from_device(usb_hc_connection_t *connection,
    117     ddf_dev_t *device)
    118 {
    119         if (device == NULL)
    120                 return EBADMEM;
    121 
    122         devman_handle_t hc_handle;
    123         const int rc = usb_get_hc_by_handle(ddf_dev_get_handle(device), &hc_handle);
    124         if (rc == EOK) {
    125                 usb_hc_connection_initialize(connection, hc_handle);
    126         }
    127 
    128         return rc;
    129 }
    130110
    131111void usb_hc_connection_deinitialize(usb_hc_connection_t *connection)
Note: See TracChangeset for help on using the changeset viewer.