Ignore:
Timestamp:
2018-01-31T02:21:24Z (7 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0a9cc2
Parents:
132ab5d1
Message:

Merge commit '50f19b7ee8e94570b5c63896736c4eb49cfa18db' into forwardport

Not all ints are converted to errno_t in xhci tree yet, however it compiles and works :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/ddf_helpers.c

    r132ab5d1 r5a6cc679  
    6363 * @return Error code.
    6464 */
    65 static int register_endpoint(ddf_fun_t *fun, usb_pipe_desc_t *pipe_desc,
     65static errno_t register_endpoint(ddf_fun_t *fun, usb_pipe_desc_t *pipe_desc,
    6666     const usb_endpoint_descriptors_t *ep_desc)
    6767{
     
    9797  * @return Error code.
    9898  */
    99 static int unregister_endpoint(ddf_fun_t *fun, const usb_pipe_desc_t *pipe_desc)
     99static errno_t unregister_endpoint(ddf_fun_t *fun, const usb_pipe_desc_t *pipe_desc)
    100100{
    101101        assert(fun);
     
    118118 * @param fun DDF function of the device (hub) requesting the address.
    119119 */
    120 static int default_address_reservation(ddf_fun_t *fun, bool reserve)
     120static errno_t default_address_reservation(ddf_fun_t *fun, bool reserve)
    121121{
    122122        assert(fun);
     
    142142 * @param speed USB speed of the new device
    143143 */
    144 static int device_enumerate(ddf_fun_t *fun, unsigned port, usb_speed_t speed)
     144static errno_t device_enumerate(ddf_fun_t *fun, unsigned port, usb_speed_t speed)
    145145{
    146146        assert(fun);
     
    152152        assert(hub);
    153153
    154         int err;
     154        errno_t err;
    155155
    156156        if (!usb_speed_is_valid(speed))
     
    195195}
    196196
    197 static int device_remove(ddf_fun_t *fun, unsigned port)
     197static errno_t device_remove(ddf_fun_t *fun, unsigned port)
    198198{
    199199        assert(fun);
     
    235235 * @return Error code.
    236236 */
    237 static int get_device_description(ddf_fun_t *fun, usb_device_desc_t *desc)
     237static errno_t get_device_description(ddf_fun_t *fun, usb_device_desc_t *desc)
    238238{
    239239        assert(fun);
     
    264264 * @return Error code.
    265265 */
    266 static int dev_read(ddf_fun_t *fun, usb_target_t target,
     266static errno_t dev_read(ddf_fun_t *fun, usb_target_t target,
    267267    uint64_t setup_data, char *data, size_t size,
    268268    usbhc_iface_transfer_callback_t callback, void *arg)
     
    298298 * @return Error code.
    299299 */
    300 static int dev_write(ddf_fun_t *fun, usb_target_t target,
     300static errno_t dev_write(ddf_fun_t *fun, usb_target_t target,
    301301    uint64_t setup_data, const char *data, size_t size,
    302302    usbhc_iface_transfer_callback_t callback, void *arg)
     
    370370
    371371/* This is a copy of lib/usbdev/src/recognise.c */
    372 static int create_match_ids(match_id_list_t *l,
     372static errno_t create_match_ids(match_id_list_t *l,
    373373    usb_standard_device_descriptor_t *d)
    374374{
     
    427427}
    428428
    429 int hcd_ddf_setup_match_ids(device_t *device, usb_standard_device_descriptor_t *desc)
    430 {
    431         int err;
     429errno_t hcd_ddf_setup_match_ids(device_t *device, usb_standard_device_descriptor_t *desc)
     430{
     431        errno_t err;
    432432        match_id_list_t mids;
    433433
     
    457457 * This function does all the ddf work for hc driver.
    458458 */
    459 int hcd_ddf_setup_hc(ddf_dev_t *device, size_t size)
     459errno_t hcd_ddf_setup_hc(ddf_dev_t *device, size_t size)
    460460{
    461461        assert(device);
     
    468468        instance->ddf_dev = device;
    469469
    470         int ret = ENOMEM;
     470        errno_t ret = ENOMEM;
    471471        instance->ctl_fun = ddf_fun_create(device, fun_exposed, "ctl");
    472472        if (!instance->ctl_fun) {
     
    510510 * @return Error code.
    511511 */
    512 int hcd_ddf_enable_interrupt(hc_device_t *hcd, int inum)
     512errno_t hcd_ddf_enable_interrupt(hc_device_t *hcd, int inum)
    513513{
    514514        async_sess_t *parent_sess = ddf_dev_parent_sess_get(hcd->ddf_dev);
     
    519519}
    520520
    521 int hcd_ddf_get_registers(hc_device_t *hcd, hw_res_list_parsed_t *hw_res)
     521errno_t hcd_ddf_get_registers(hc_device_t *hcd, hw_res_list_parsed_t *hw_res)
    522522{
    523523        async_sess_t *parent_sess = ddf_dev_parent_sess_get(hcd->ddf_dev);
     
    526526
    527527        hw_res_list_parsed_init(hw_res);
    528         const int ret = hw_res_get_list_parsed(parent_sess, hw_res, 0);
     528        const errno_t ret = hw_res_get_list_parsed(parent_sess, hw_res, 0);
    529529        if (ret != EOK)
    530530                hw_res_list_parsed_clean(hw_res);
Note: See TracChangeset for help on using the changeset viewer.