From: "Víctor Manuel Jáquez Leal" <vjaquez@igalia.com>
To: Omar Ramirez Luna <omar.ramirez@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Felipe Contreras <felipe.contreras@nokia.com>,
linux-omap@vger.kernel.org
Subject: [PATCH 01/17] staging: tidspbridge: remove drv_init() and drv_exit()
Date: Fri, 9 Mar 2012 01:03:36 +0100 [thread overview]
Message-ID: <00a2dae835cdd8257d5fa5f1d5900bd5f759df1b.1331250369.git.vjaquez@igalia.com> (raw)
In-Reply-To: <cover.1331250368.git.vjaquez@igalia.com>
In-Reply-To: <cover.1331250368.git.vjaquez@igalia.com>
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>
---
.../staging/tidspbridge/include/dspbridge/drv.h | 23 -----------------
drivers/staging/tidspbridge/pmgr/dspapi.c | 8 +----
drivers/staging/tidspbridge/rmgr/drv.c | 26 --------------------
3 files changed, 2 insertions(+), 55 deletions(-)
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index 9cdbd95..b0c7708 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -199,17 +199,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:
* Returns the Ptr to the FirstDev Object in the List
@@ -294,18 +283,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:
* Insert a DeviceObject into the list of Driver object.
diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c
index 2788946..dcf1dab 100644
--- a/drivers/staging/tidspbridge/pmgr/dspapi.c
+++ b/drivers/staging/tidspbridge/pmgr/dspapi.c
@@ -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();
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index b34dba7..6795205 100644
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -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;
@@ -332,16 +331,6 @@ int drv_create(struct drv_object **drv_obj)
}
/*
- * ======== drv_exit ========
- * Purpose:
- * Discontinue usage of the DRV module.
- */
-void drv_exit(void)
-{
- refs--;
-}
-
-/*
* ======== = drv_destroy ======== =
* purpose:
* Invoked during bridge de-initialization
@@ -499,21 +488,6 @@ u32 drv_get_next_dev_extension(u32 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:
* Insert a DevObject into the list of Manager object.
--
1.7.9.1
next prev parent reply other threads:[~2012-03-09 0:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 0:03 [PATCH 00/17] staging: tidspbridge: remove unused references counting Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` Víctor Manuel Jáquez Leal [this message]
2012-03-09 0:03 ` [PATCH 02/17] staging: tidspbridge: remove cod_init() and cod_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 03/17] staging: tidspbridge: remove proc_init() and proc_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 04/17] staging: tidspbridge: remove node_init() and node_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 05/17] staging: tidspbridge: remove disp_init() and disp_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 06/17] staging: tidspbridge: remove strm_init() and strm_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 07/17] staging: tidspbridge: remove rmm_init() and rmm_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 08/17] staging: tidspbridge: remove chnl_init() and chnl_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 09/17] staging: tidspbridge: remove msg_mod_init() and msg_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 10/17] staging: tidspbridge: remove io_init() and io_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 11/17] staging: tidspbridge: remove cmm_init() and cmm_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 12/17] staging: tidspbridge: remove dmm_init() and dmm_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 13/17] staging: tidspbridge: remove dev_init() and dev_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 14/17] staging: tidspbridge: simplify mgr_init() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 15/17] staging: tidspbridge: remove gh_init() and gh_exit() Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 16/17] staging: tidspbridge: remove ref counting in nldr.c Víctor Manuel Jáquez Leal
2012-03-09 0:03 ` [PATCH 17/17] staging: tidspbridge: remove nldr_init() and nldr_exit() Víctor Manuel Jáquez Leal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00a2dae835cdd8257d5fa5f1d5900bd5f759df1b.1331250369.git.vjaquez@igalia.com \
--to=vjaquez@igalia.com \
--cc=devel@driverdev.osuosl.org \
--cc=felipe.contreras@nokia.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=omar.ramirez@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®