Changeset 54de5ebd in mainline


Ignore:
Timestamp:
2011-01-09T12:26:33Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0adddea
Parents:
a676574
Message:

Whitespace cleanup.

Location:
uspace/lib/c
Files:
4 edited

Legend:

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

    ra676574 r54de5ebd  
    8282                if (rc == EOK)
    8383                        return (ssize_t) ret;
    84                        
     84               
    8585                return (ssize_t) rc;
    8686        }
  • uspace/lib/c/generic/device/hw_res.c

    ra676574 r54de5ebd  
    4141{
    4242        sysarg_t count = 0;
    43         int rc = async_req_1_1(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), GET_RESOURCE_LIST, &count);
     43
     44        int rc = async_req_1_1(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE),
     45            GET_RESOURCE_LIST, &count);
    4446        hw_resources->count = count;
    4547        if (rc != EOK)
     
    5759                return rc;
    5860        }
    59                  
     61       
    6062        return EOK;
    6163}
     
    6365bool enable_interrupt(int dev_phone)
    6466{
    65         int rc = async_req_1_0(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), ENABLE_INTERRUPT);
     67        int rc = async_req_1_0(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE),
     68            ENABLE_INTERRUPT);
    6669        return rc == EOK;
    6770}
  • uspace/lib/c/include/device/char.h

    ra676574 r54de5ebd  
    2727 */
    2828
    29  /** @addtogroup libc
     29/** @addtogroup libc
    3030 * @{
    3131 */
  • uspace/lib/c/include/device/hw_res.h

    ra676574 r54de5ebd  
    2727 */
    2828 
    29  /** @addtogroup libc
     29/** @addtogroup libc
    3030 * @{
    3131 */
     
    4343typedef enum {
    4444        GET_RESOURCE_LIST = 0,
    45         ENABLE_INTERRUPT       
     45        ENABLE_INTERRUPT
    4646} hw_res_funcs_t;
    4747
     
    5858} endianness_t;
    5959
    60 
    6160/** HW resource (e.g. interrupt, memory register, i/o register etc.). */
    6261typedef struct hw_resource {
     
    6564                struct {
    6665                        uint64_t address;
    67                         endianness_t endianness;                       
    68                         size_t size;                   
     66                        endianness_t endianness;
     67                        size_t size;
    6968                } mem_range;
    7069                struct {
    7170                        uint64_t address;
    72                         endianness_t endianness;                       
    73                         size_t size;                   
     71                        endianness_t endianness;
     72                        size_t size;
    7473                } io_range;
    7574                struct {
    76                         int irq;                       
    77                 } interrupt;           
    78         } res; 
     75                        int irq;
     76                } interrupt;
     77        } res;
    7978} hw_resource_t;
    8079
    8180typedef struct hw_resource_list {
    8281        size_t count;
    83         hw_resource_t *resources;       
     82        hw_resource_t *resources;
    8483} hw_resource_list_t;
    8584
    8685static inline void clean_hw_resource_list(hw_resource_list_t *hw_res)
    8786{
    88         if(NULL != hw_res->resources) {
     87        if (NULL != hw_res->resources) {
    8988                free(hw_res->resources);
     89
    9090                hw_res->resources = NULL;
    9191        }
    92         hw_res->count = 0;     
     92
     93        hw_res->count = 0;
    9394}
    94 
    95 
    9695
    9796extern int get_hw_resources(int, hw_resource_list_t *);
    9897extern bool enable_interrupt(int);
    99 
    10098
    10199#endif
Note: See TracChangeset for help on using the changeset viewer.