diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2012-03-09 01:03:48 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-09 13:21:08 -0800 |
commit | a05c5dc3fc73c11fbb06c493b1ae6d77c4ac172e (patch) | |
tree | 9b9676e417cf8b76c154169b6b1007464964aec5 /drivers/staging/tidspbridge/pmgr/dspapi.c | |
parent | d071c0e9cad589a42a6c1739b088acb9d4724481 (diff) |
staging: tidspbridge: remove dev_init() and dev_exit()
The dev module has a dev_init() and a dev_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>
Diffstat (limited to 'drivers/staging/tidspbridge/pmgr/dspapi.c')
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/dspapi.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c index b9ca24c18e13..9ef1ad9527af 100644 --- a/drivers/staging/tidspbridge/pmgr/dspapi.c +++ b/drivers/staging/tidspbridge/pmgr/dspapi.c @@ -265,11 +265,8 @@ void api_exit(void) { api_c_refs--; - if (api_c_refs == 0) { - /* Release all modules initialized in api_init(). */ - dev_exit(); + if (api_c_refs == 0) mgr_exit(); - } } /* @@ -280,23 +277,10 @@ void api_exit(void) bool api_init(void) { bool ret = true; - bool fdev; - bool fmgr; - - if (api_c_refs == 0) { - /* initialize driver and other modules */ - fmgr = mgr_init(); - fdev = dev_init(); - ret = fdev && fmgr; - if (!ret) { - if (fmgr) - mgr_exit(); + if (api_c_refs == 0) + ret = mgr_init(); - if (fdev) - dev_exit(); - } - } if (ret) api_c_refs++; |