Changeset 58563585 in mainline for uspace/lib/drv


Ignore:
Timestamp:
2016-08-31T11:15:39Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
10cb47e
Parents:
7a67416
Message:

code review and cstyle cleanup (no change in functionality)

Location:
uspace/lib/drv
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    r7a67416 r58563585  
    126126                return;
    127127        }
    128 
     128       
    129129        ddf_dev_t *dev = create_device();
    130130        if (!dev) {
     
    133133                return;
    134134        }
    135 
     135       
    136136        /* Add one reference that will be dropped by driver_dev_remove() */
    137137        dev_add_ref(dev);
  • uspace/lib/drv/generic/remote_ahci.c

    r7a67416 r58563585  
    226226                return;
    227227        }       
    228 
     228       
    229229        const int ret = ahci_iface->get_sata_device_name(fun,
    230230            sata_dev_name_length, sata_dev_name);
     
    235235            (real_size == sata_dev_name_length))
    236236                async_data_read_finalize(cid, sata_dev_name, sata_dev_name_length);
    237 
     237       
    238238        free(sata_dev_name);
    239239        async_answer_0(callid, ret);
  • uspace/lib/drv/generic/remote_usb.c

    r7a67416 r58563585  
    9191
    9292/** Tell devman handle of the usb device function.
    93  * @param[in] exch IPC communication exchange
     93 *
     94 * @param[in]  exch   IPC communication exchange
    9495 * @param[out] handle devman handle of the HC used by the target device.
     96 *
    9597 * @return Error code.
     98 *
    9699 */
    97100int usb_get_my_device_handle(async_exch_t *exch, devman_handle_t *handle)
     
    119122
    120123/** Release default USB address.
     124 *
    121125 * @param[in] exch IPC communication exchange
     126 *
    122127 * @return Error code.
     128 *
    123129 */
    124130int usb_release_default_address(async_exch_t *exch)
     
    131137
    132138/** Trigger USB device enumeration
    133  * @param[in] exch IPC communication exchange
     139 *
     140 * @param[in]  exch   IPC communication exchange
    134141 * @param[out] handle Identifier of the newly added device (if successful)
     142 *
    135143 * @return Error code.
     144 *
    136145 */
    137146int usb_device_enumerate(async_exch_t *exch, unsigned port)
     
    145154
    146155/** Trigger USB device enumeration
    147  * @param[in] exch IPC communication exchange
     156 *
     157 * @param[in] exch   IPC communication exchange
    148158 * @param[in] handle Identifier of the device
     159 *
    149160 * @return Error code.
     161 *
    150162 */
    151163int usb_device_remove(async_exch_t *exch, unsigned port)
  • uspace/lib/drv/include/usb_iface.h

    r7a67416 r58563585  
    4444typedef async_sess_t usb_dev_session_t;
    4545
    46 usb_dev_session_t *usb_dev_connect(devman_handle_t);
    47 usb_dev_session_t *usb_dev_connect_to_self(ddf_dev_t *);
    48 void usb_dev_disconnect(usb_dev_session_t *);
     46extern usb_dev_session_t *usb_dev_connect(devman_handle_t);
     47extern usb_dev_session_t *usb_dev_connect_to_self(ddf_dev_t *);
     48extern void usb_dev_disconnect(usb_dev_session_t *);
    4949
    50 int usb_get_my_interface(async_exch_t *, int *);
    51 int usb_get_my_device_handle(async_exch_t *, devman_handle_t *);
     50extern int usb_get_my_interface(async_exch_t *, int *);
     51extern int usb_get_my_device_handle(async_exch_t *, devman_handle_t *);
    5252
    53 int usb_reserve_default_address(async_exch_t *, usb_speed_t);
    54 int usb_release_default_address(async_exch_t *);
     53extern int usb_reserve_default_address(async_exch_t *, usb_speed_t);
     54extern int usb_release_default_address(async_exch_t *);
    5555
    56 int usb_device_enumerate(async_exch_t *, unsigned port);
    57 int usb_device_remove(async_exch_t *, unsigned port);
     56extern int usb_device_enumerate(async_exch_t *, unsigned port);
     57extern int usb_device_remove(async_exch_t *, unsigned port);
    5858
    59 int usb_register_endpoint(async_exch_t *, usb_endpoint_t, usb_transfer_type_t,
    60     usb_direction_t, size_t, unsigned, unsigned);
    61 int usb_unregister_endpoint(async_exch_t *, usb_endpoint_t, usb_direction_t);
    62 int usb_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t, size_t *);
    63 int usb_write(async_exch_t *, usb_endpoint_t, uint64_t, const void *, size_t);
     59extern int usb_register_endpoint(async_exch_t *, usb_endpoint_t,
     60    usb_transfer_type_t, usb_direction_t, size_t, unsigned, unsigned);
     61extern int usb_unregister_endpoint(async_exch_t *, usb_endpoint_t,
     62    usb_direction_t);
     63extern int usb_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t,
     64    size_t *);
     65extern int usb_write(async_exch_t *, usb_endpoint_t, uint64_t, const void *,
     66    size_t);
    6467
    6568/** Callback for outgoing transfer. */
  • uspace/lib/drv/include/usbhc_iface.h

    r7a67416 r58563585  
    4444#include <stdbool.h>
    4545
    46 int usbhc_read(async_exch_t *, usb_address_t, usb_endpoint_t,
     46extern int usbhc_read(async_exch_t *, usb_address_t, usb_endpoint_t,
    4747    uint64_t, void *, size_t, size_t *);
    48 int usbhc_write(async_exch_t *, usb_address_t, usb_endpoint_t,
     48extern int usbhc_write(async_exch_t *, usb_address_t, usb_endpoint_t,
    4949    uint64_t, const void *, size_t);
    5050
Note: See TracChangeset for help on using the changeset viewer.