staging: tidspbridge: remove drv_init() and drv_exit()
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 9 Mar 2012 00:03:36 +0000 (01:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Mar 2012 21:21:05 +0000 (13:21 -0800)
The drv module has a drv_init() and a drv_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/tidspbridge/include/dspbridge/drv.h
drivers/staging/tidspbridge/pmgr/dspapi.c
drivers/staging/tidspbridge/rmgr/drv.c

index 9cdbd955dce9962ff252eda29e83353841e5d348..b0c7708321b258bdae8a7ed1b279ddfd3df7ec93 100644 (file)
@@ -198,17 +198,6 @@ extern int drv_create(struct drv_object **drv_obj);
  */
 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:
@@ -293,18 +282,6 @@ extern u32 drv_get_next_dev_object(u32 hdev_obj);
  */
 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:
index 27889466a6d27aa44aa782d533eb30811f81c230..dcf1dabcfc269ecee58031aaf5e098a0a664e131 100644 (file)
@@ -278,7 +278,6 @@ void api_exit(void)
                proc_exit();
                mgr_exit();
                rmm_exit();
-               drv_exit();
        }
 }
 
@@ -290,12 +289,11 @@ void api_exit(void)
 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();
@@ -307,11 +305,9 @@ bool api_init(void)
                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();
index b34dba739387bfa07be28794a763197c0f7114da..6795205b01553e07b671c63a1c49519b092c6e7f 100644 (file)
@@ -51,7 +51,6 @@ struct drv_ext {
 };
 
 /*  ----------------------------------- Globals */
-static s32 refs;
 static bool ext_phys_mem_pool_enabled;
 struct ext_phys_mem_pool {
        u32 phys_mem_base;
@@ -331,16 +330,6 @@ int drv_create(struct drv_object **drv_obj)
        return status;
 }
 
-/*
- *  ======== drv_exit ========
- *  Purpose:
- *      Discontinue usage of the DRV module.
- */
-void drv_exit(void)
-{
-       refs--;
-}
-
 /*
  *  ======== = drv_destroy ======== =
  *  purpose:
@@ -498,21 +487,6 @@ u32 drv_get_next_dev_extension(u32 dev_extension)
        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: