Changeset bb2f220 in rtems for cpukit/libdrvmgr


Ignore:
Timestamp:
Apr 13, 2015, 8:49:47 AM (4 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
246fe22
Parents:
bf2c3f8b
git-author:
Daniel Hellstrom <daniel@…> (04/13/15 08:49:47)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:29)
Message:

DRVMGR: renamed private drv_mgr and its struct name

Location:
cpukit/libdrvmgr
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdrvmgr/drvmgr.c

    rbf2c3f8b rbb2f220  
    2626#endif
    2727
    28 struct rtems_driver_manager drv_mgr = {
     28struct drvmgr drvmgr = {
    2929        .level =                0,
    3030        .initializing_objs =    0,
     
    5555
    5656static int do_bus_init(
    57         struct rtems_driver_manager *mgr,
     57        struct drvmgr *mgr,
    5858        struct drvmgr_bus *bus,
    5959        int level);
    6060static int do_dev_init(
    61         struct rtems_driver_manager *mgr,
     61        struct drvmgr *mgr,
    6262        struct drvmgr_dev *dev,
    6363        int level);
     
    6767void _DRV_Manager_init_level(int level)
    6868{
    69         struct rtems_driver_manager *mgr = &drv_mgr;
     69        struct drvmgr *mgr = &drvmgr;
    7070
    7171        if (mgr->level >= level)
     
    8686        struct drvmgr_drv_reg_func *drvreg;
    8787
    88         /* drv_mgr is already initialized statically by compiler except
     88        /* drvmgr is already initialized statically by compiler except
    8989         * the lock
    9090         */
     
    106106void drvmgr_init_update(void)
    107107{
    108         struct rtems_driver_manager *mgr = &drv_mgr;
     108        struct drvmgr *mgr = &drvmgr;
    109109        struct drvmgr_bus *bus;
    110110        struct drvmgr_dev *dev;
     
    184184/* Take bus into next level */
    185185static int do_bus_init(
    186         struct rtems_driver_manager *mgr,
     186        struct drvmgr *mgr,
    187187        struct drvmgr_bus *bus,
    188188        int level)
     
    243243/* Take device to initialization level 1 */
    244244static int do_dev_init(
    245         struct rtems_driver_manager *mgr,
     245        struct drvmgr *mgr,
    246246        struct drvmgr_dev *dev,
    247247        int level)
     
    318318int drvmgr_root_drv_register(struct drvmgr_drv *drv)
    319319{
    320         struct rtems_driver_manager *mgr = &drv_mgr;
     320        struct drvmgr *mgr = &drvmgr;
    321321        struct drvmgr_dev *root = &mgr->root_dev;
    322322
     
    347347int drvmgr_drv_register(struct drvmgr_drv *drv)
    348348{
    349         struct rtems_driver_manager *mgr = &drv_mgr;
     349        struct drvmgr *mgr = &drvmgr;
    350350
    351351        /* All drivers must have been registered before start of init,
     
    455455                struct drvmgr_dev *dev)
    456456{
    457         struct rtems_driver_manager *mgr = &drv_mgr;
     457        struct drvmgr *mgr = &drvmgr;
    458458        struct drvmgr_drv *drv;
    459459
     
    474474int drvmgr_dev_register(struct drvmgr_dev *dev)
    475475{
    476         struct rtems_driver_manager *mgr = &drv_mgr;
     476        struct drvmgr *mgr = &drvmgr;
    477477        struct drvmgr_drv *drv;
    478478        struct drvmgr_bus *bus = dev->parent;
     
    569569int drvmgr_bus_register(struct drvmgr_bus *bus)
    570570{
    571         struct rtems_driver_manager *mgr = &drv_mgr;
     571        struct drvmgr *mgr = &drvmgr;
    572572        struct drvmgr_bus *bus_up;
    573573
  • cpukit/libdrvmgr/drvmgr_by_id.c

    rbf2c3f8b rbb2f220  
    1414struct drvmgr_drv *drvmgr_drv_by_id(uint64_t id)
    1515{
    16         struct rtems_driver_manager *mgr = &drv_mgr;
     16        struct drvmgr *mgr = &drvmgr;
    1717        struct drvmgr_drv *drv = NULL;
    1818
  • cpukit/libdrvmgr/drvmgr_by_name.c

    rbf2c3f8b rbb2f220  
    1515struct drvmgr_drv *drvmgr_drv_by_name(const char *name)
    1616{
    17         struct rtems_driver_manager *mgr = &drv_mgr;
     17        struct drvmgr *mgr = &drvmgr;
    1818        struct drvmgr_drv *drv = NULL;
    1919
  • cpukit/libdrvmgr/drvmgr_for_each_dev.c

    rbf2c3f8b rbb2f220  
    2525        pos = 0;
    2626        memset(&buses[0], 0, sizeof(buses));
    27         buses[pos++] = drv_mgr.root_dev.bus;    /* Get root bus */
     27        buses[pos++] = drvmgr.root_dev.bus;     /* Get root bus */
    2828
    2929        for (i = 0, bus = buses[0]; buses[i]; i++, bus = buses[i]) {
     
    5353
    5454        /* Get first device */
    55         dev = drv_mgr.root_dev.bus->children;
     55        dev = drvmgr.root_dev.bus->children;
    5656
    5757        while (dev) {
     
    6666                                /* Step up one level... back to parent bus */
    6767                                dev = dev->parent->dev;
    68                                 if (dev == &drv_mgr.root_dev)
     68                                if (dev == &drvmgr.root_dev)
    6969                                        break;
    7070                                goto next_dev;
     
    9090
    9191        /* Get Root Device */
    92         if (drv_mgr.root_dev.bus->children != NULL) {
     92        if (drvmgr.root_dev.bus->children != NULL) {
    9393                if (options & DRVMGR_FED_BF)
    9494                        ret = drvmgr_for_each_dev_breadth(func, arg);
  • cpukit/libdrvmgr/drvmgr_internal.h

    rbf2c3f8b rbb2f220  
    1111 *  internally by Driver Manager routines.
    1212 */
    13 struct rtems_driver_manager {
     13struct drvmgr {
    1414        int     level;
    1515        int     initializing_objs;
     
    4646};
    4747
    48 extern struct rtems_driver_manager drv_mgr;
     48extern struct drvmgr drvmgr;
    4949
    5050extern void _DRV_Manager_Lock(void);
  • cpukit/libdrvmgr/drvmgr_lock.c

    rbf2c3f8b rbb2f220  
    1414void _DRV_Manager_Lock(void)
    1515{
    16         rtems_semaphore_obtain(drv_mgr.lock, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
     16        rtems_semaphore_obtain(drvmgr.lock, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
    1717}
    1818
    1919void _DRV_Manager_Unlock(void)
    2020{
    21         rtems_semaphore_release(drv_mgr.lock);
     21        rtems_semaphore_release(drvmgr.lock);
    2222}
    2323
     
    3131                RTEMS_DEFAULT_ATTRIBUTES,
    3232                0,
    33                 &drv_mgr.lock);
     33                &drvmgr.lock);
    3434        if (rc != RTEMS_SUCCESSFUL)
    3535                return -1;
  • cpukit/libdrvmgr/drvmgr_print.c

    rbf2c3f8b rbb2f220  
    4040void drvmgr_print_devs(unsigned int options)
    4141{
    42         struct rtems_driver_manager *mgr = &drv_mgr;
     42        struct drvmgr *mgr = &drvmgr;
    4343        char *parg;
    4444
     
    105105void drvmgr_print_mem(void)
    106106{
    107         struct rtems_driver_manager *mgr = &drv_mgr;
     107        struct drvmgr *mgr = &drvmgr;
    108108        struct drvmgr_bus *bus;
    109109        struct drvmgr_dev *dev;
     
    181181void drvmgr_summary(void)
    182182{
    183         struct rtems_driver_manager *mgr = &drv_mgr;
     183        struct drvmgr *mgr = &drvmgr;
    184184        struct drvmgr_bus *bus;
    185185        struct drvmgr_dev *dev;
     
    421421void drvmgr_info_devs(unsigned int options)
    422422{
    423         struct rtems_driver_manager *mgr = &drv_mgr;
     423        struct drvmgr *mgr = &drvmgr;
    424424        struct drvmgr_dev *dev;
    425425
     
    432432void drvmgr_info_drvs(unsigned int options)
    433433{
    434         struct rtems_driver_manager *mgr = &drv_mgr;
     434        struct drvmgr *mgr = &drvmgr;
    435435        struct drvmgr_drv *drv;
    436436
     
    445445void drvmgr_info_buses(unsigned int options)
    446446{
    447         struct rtems_driver_manager *mgr = &drv_mgr;
     447        struct drvmgr *mgr = &drvmgr;
    448448        struct drvmgr_bus *bus;
    449449
  • cpukit/libdrvmgr/drvmgr_translate.c

    rbf2c3f8b rbb2f220  
    138138        rev = (~options) & 1;
    139139        if ((options == CPUMEM_TO_DMA) || (options == DMAMEM_FROM_CPU)) {
    140                 from = drv_mgr.root_dev.bus;
     140                from = drvmgr.root_dev.bus;
    141141                to = dev->parent;
    142142        } else { /* CPUMEM_FROM_DMA || DMAMEM_TO_CPU */
    143143                from = dev->parent;
    144                 to = drv_mgr.root_dev.bus;
     144                to = drvmgr.root_dev.bus;
    145145        }
    146146
  • cpukit/libdrvmgr/drvmgr_unregister.c

    rbf2c3f8b rbb2f220  
    4343int drvmgr_bus_unregister(struct drvmgr_bus *bus)
    4444{
    45         struct rtems_driver_manager *mgr = &drv_mgr;
     45        struct drvmgr *mgr = &drvmgr;
    4646        struct drvmgr_list *list;
    4747
     
    7979int drvmgr_dev_drv_separate(struct drvmgr_dev *dev)
    8080{
    81         struct rtems_driver_manager *mgr = &drv_mgr;
     81        struct drvmgr *mgr = &drvmgr;
    8282        struct drvmgr_dev *subdev, **pprev;
    8383        int rc;
     
    150150int drvmgr_dev_unregister(struct drvmgr_dev *dev)
    151151{
    152         struct rtems_driver_manager *mgr = &drv_mgr;
     152        struct drvmgr *mgr = &drvmgr;
    153153        struct drvmgr_dev *subdev, **pprev;
    154154        int err;
Note: See TracChangeset for help on using the changeset viewer.