Changeset 8565a42 in mainline for uspace/lib/c/generic/device/hw_res.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/device/hw_res.c

    r3061bc1 r8565a42  
    4242{
    4343        sysarg_t count = 0;
    44        
     44
    4545        async_exch_t *exch = async_exchange_begin(sess);
    46        
     46
    4747        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    4848            HW_RES_GET_RESOURCE_LIST, &count);
    49        
     49
    5050        if (rc != EOK) {
    5151                async_exchange_end(exch);
    5252                return rc;
    5353        }
    54        
     54
    5555        size_t size = count * sizeof(hw_resource_t);
    5656        hw_resource_t *resources = (hw_resource_t *) malloc(size);
     
    6060                return ENOMEM;
    6161        }
    62        
     62
    6363        rc = async_data_read_start(exch, resources, size);
    6464        async_exchange_end(exch);
    65        
     65
    6666        if (rc != EOK) {
    6767                free(resources);
    6868                return rc;
    6969        }
    70        
     70
    7171        hw_resources->resources = resources;
    7272        hw_resources->count = count;
    73        
     73
    7474        return EOK;
    7575}
     
    7878{
    7979        async_exch_t *exch = async_exchange_begin(sess);
    80        
     80
    8181        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    8282            HW_RES_ENABLE_INTERRUPT, irq);
    8383        async_exchange_end(exch);
    84        
     84
    8585        return rc;
    8686}
     
    8989{
    9090        async_exch_t *exch = async_exchange_begin(sess);
    91        
     91
    9292        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    9393            HW_RES_DISABLE_INTERRUPT, irq);
    9494        async_exchange_end(exch);
    95        
     95
    9696        return rc;
    9797}
     
    100100{
    101101        async_exch_t *exch = async_exchange_begin(sess);
    102        
     102
    103103        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    104104            HW_RES_CLEAR_INTERRUPT, irq);
    105105        async_exchange_end(exch);
    106        
     106
    107107        return rc;
    108108}
     
    126126{
    127127        async_exch_t *exch = async_exchange_begin(sess);
    128        
     128
    129129        const uint32_t packed = (channel & 0xffff) | (mode << 16);
    130130        const errno_t ret = async_req_4_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    131131            HW_RES_DMA_CHANNEL_SETUP, packed, pa, size);
    132        
     132
    133133        async_exchange_end(exch);
    134        
     134
    135135        return ret;
    136136}
     
    148148{
    149149        async_exch_t *exch = async_exchange_begin(sess);
    150        
     150
    151151        sysarg_t remain;
    152152        const errno_t ret = async_req_2_1(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    153153            HW_RES_DMA_CHANNEL_REMAIN, channel, &remain);
    154        
     154
    155155        async_exchange_end(exch);
    156        
     156
    157157        if (ret == EOK)
    158158                *rem = remain;
    159        
     159
    160160        return ret;
    161161}
Note: See TracChangeset for help on using the changeset viewer.