*/
extern int drv_destroy(struct drv_object *driver_obj);
-/*
- * ======== drv_exit ========
- * Purpose:
- * Exit the DRV module, freeing any modules initialized in drv_init.
- * Parameters:
- * Returns:
- * Requires:
- * Ensures:
- */
-extern void drv_exit(void);
-
/*
* ======== drv_get_first_dev_object ========
* Purpose:
*/
extern u32 drv_get_next_dev_extension(u32 dev_extension);
-/*
- * ======== drv_init ========
- * Purpose:
- * Initialize the DRV module.
- * Parameters:
- * Returns:
- * TRUE if success; FALSE otherwise.
- * Requires:
- * Ensures:
- */
-extern int drv_init(void);
-
/*
* ======== drv_insert_dev_object ========
* Purpose:
proc_exit();
mgr_exit();
rmm_exit();
- drv_exit();
}
}
bool api_init(void)
{
bool ret = true;
- bool fdrv, fdev, fcod, fchnl, fmsg, fio;
+ bool fdev, fcod, fchnl, fmsg, fio;
bool fmgr, fproc, fnode, fdisp, fstrm, frmm;
if (api_c_refs == 0) {
/* initialize driver and other modules */
- fdrv = drv_init();
fmgr = mgr_init();
fproc = proc_init();
fnode = node_init();
fio = io_init();
fdev = dev_init();
fcod = cod_init();
- ret = fdrv && fdev && fchnl && fcod && fmsg && fio;
+ ret = fdev && fchnl && fcod && fmsg && fio;
ret = ret && fmgr && fproc && frmm;
if (!ret) {
- if (fdrv)
- drv_exit();
if (fmgr)
mgr_exit();
};
/* ----------------------------------- Globals */
-static s32 refs;
static bool ext_phys_mem_pool_enabled;
struct ext_phys_mem_pool {
u32 phys_mem_base;
return status;
}
-/*
- * ======== drv_exit ========
- * Purpose:
- * Discontinue usage of the DRV module.
- */
-void drv_exit(void)
-{
- refs--;
-}
-
/*
* ======== = drv_destroy ======== =
* purpose:
return dw_dev_extension;
}
-/*
- * ======== drv_init ========
- * Purpose:
- * Initialize DRV module private state.
- */
-int drv_init(void)
-{
- s32 ret = 1; /* function return value */
-
- if (ret)
- refs++;
-
- return ret;
-}
-
/*
* ======== drv_insert_dev_object ========
* Purpose: