Changeset f724e82 in mainline


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

Clean up hw_res interface client API.

Location:
uspace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ns8250/ns8250.c

    rb2263e6a rf724e82  
    347347       
    348348        /* Get hw resources. */
    349         ret = get_hw_resources(dev->parent_phone, &hw_resources);
     349        ret = hw_res_get_resource_list(dev->parent_phone, &hw_resources);
    350350        if (ret != EOK) {
    351351                printf(NAME ": failed to get hw resources for the device "
     
    394394        }
    395395       
    396         clean_hw_resource_list(&hw_resources);
     396        hw_res_clean_resource_list(&hw_resources);
    397397        return ret;
    398398       
    399399failed:
    400400        ns8250_dev_cleanup(dev);
    401         clean_hw_resource_list(&hw_resources);
     401        hw_res_clean_resource_list(&hw_resources);
    402402        return ret;
    403403}
  • uspace/drv/pciintel/pci.c

    rb2263e6a rf724e82  
    473473        hw_resource_list_t hw_resources;
    474474       
    475         rc = get_hw_resources(dev->parent_phone, &hw_resources);
     475        rc = hw_res_get_resource_list(dev->parent_phone, &hw_resources);
    476476        if (rc != EOK) {
    477477                printf(NAME ": pci_add_device failed to get hw resources for "
     
    497497                delete_pci_bus_data(bus_data);
    498498                ipc_hangup(dev->parent_phone);
    499                 clean_hw_resource_list(&hw_resources);
     499                hw_res_clean_resource_list(&hw_resources);
    500500                return EADDRNOTAVAIL;
    501501        }
     
    508508        pci_bus_scan(dev, 0);
    509509       
    510         clean_hw_resource_list(&hw_resources);
     510        hw_res_clean_resource_list(&hw_resources);
    511511       
    512512        return EOK;
     
    537537{
    538538        if (dev_data != NULL) {
    539                 clean_hw_resource_list(&dev_data->hw_resources);
     539                hw_res_clean_resource_list(&dev_data->hw_resources);
    540540                free(dev_data);
    541541        }
  • uspace/lib/c/generic/device/hw_res.c

    rb2263e6a rf724e82  
    3838#include <malloc.h>
    3939
    40 int get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources)
     40int hw_res_get_resource_list(int dev_phone, hw_resource_list_t *hw_resources)
    4141{
    4242        sysarg_t count = 0;
    4343
    4444        int rc = async_req_1_1(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    45             GET_RESOURCE_LIST, &count);
     45            HW_RES_GET_RESOURCE_LIST, &count);
    4646
    4747        hw_resources->count = count;
     
    6464}
    6565
    66 bool enable_interrupt(int dev_phone)
     66bool hw_res_enable_interrupt(int dev_phone)
    6767{
    6868        int rc = async_req_1_0(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    69             ENABLE_INTERRUPT);
     69            HW_RES_ENABLE_INTERRUPT);
    7070
    7171        return rc == EOK;
  • uspace/lib/c/include/device/hw_res.h

    rb2263e6a rf724e82  
    4141/** HW resource provider interface */
    4242typedef enum {
    43         GET_RESOURCE_LIST = 0,
    44         ENABLE_INTERRUPT
     43        HW_RES_GET_RESOURCE_LIST = 0,
     44        HW_RES_ENABLE_INTERRUPT
    4545} hw_res_funcs_t;
    4646
     
    8484} hw_resource_list_t;
    8585
    86 static inline void clean_hw_resource_list(hw_resource_list_t *hw_res)
     86static inline void hw_res_clean_resource_list(hw_resource_list_t *hw_res)
    8787{
    8888        if (hw_res->resources != NULL) {
     
    9595}
    9696
    97 extern int get_hw_resources(int, hw_resource_list_t *);
    98 extern bool enable_interrupt(int);
     97extern int hw_res_get_resource_list(int, hw_resource_list_t *);
     98extern bool hw_res_enable_interrupt(int);
    9999
    100100#endif
Note: See TracChangeset for help on using the changeset viewer.