Changeset 0adddea in mainline


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

Some cstyle cleanup.

Location:
uspace/lib/c
Files:
2 edited

Legend:

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

    r54de5ebd r0adddea  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28  
     28
    2929 /** @addtogroup libc
    3030 * @{
     
    3232/** @file
    3333 */
    34  
     34
    3535#include <device/hw_res.h>
    3636#include <errno.h>
     
    4444        int rc = async_req_1_1(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    4545            GET_RESOURCE_LIST, &count);
     46
    4647        hw_resources->count = count;
    4748        if (rc != EOK)
     
    6768        int rc = async_req_1_0(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    6869            ENABLE_INTERRUPT);
     70
    6971        return rc == EOK;
    7072}
    71  
    72  
    73  
    74  /** @}
     73
     74/** @}
    7575 */
  • uspace/lib/c/include/device/hw_res.h

    r54de5ebd r0adddea  
    3939#include <bool.h>
    4040
    41 // HW resource provider interface
    42 
     41/** HW resource provider interface */
    4342typedef enum {
    4443        GET_RESOURCE_LIST = 0,
     
    4645} hw_res_funcs_t;
    4746
    48 /** HW resource types. */
     47/** HW resource types */
    4948typedef enum {
    5049        INTERRUPT,
     
    5857} endianness_t;
    5958
    60 /** HW resource (e.g. interrupt, memory register, i/o register etc.). */
    61 typedef struct hw_resource {
     59/** HW resource (e.g. interrupt, memory register, i/o register etc.) */
     60typedef struct {
    6261        hw_res_type_t type;
    6362        union {
     
    6766                        size_t size;
    6867                } mem_range;
     68
    6969                struct {
    7070                        uint64_t address;
     
    7272                        size_t size;
    7373                } io_range;
     74
    7475                struct {
    7576                        int irq;
     
    7879} hw_resource_t;
    7980
    80 typedef struct hw_resource_list {
     81typedef struct {
    8182        size_t count;
    8283        hw_resource_t *resources;
     
    8586static inline void clean_hw_resource_list(hw_resource_list_t *hw_res)
    8687{
    87         if (NULL != hw_res->resources) {
     88        if (hw_res->resources != NULL) {
    8889                free(hw_res->resources);
    8990
Note: See TracChangeset for help on using the changeset viewer.