diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2012-03-08 19:03:47 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-09 16:21:07 -0500 |
commit | d071c0e9cad589a42a6c1739b088acb9d4724481 (patch) | |
tree | 08b22de91a340e6d9740a7c1824f334aea255bca /drivers/staging/tidspbridge/pmgr | |
parent | a71aa396eec042606b9722745d4aa4159bde2e87 (diff) |
staging: tidspbridge: remove dmm_init() and dmm_exit()
The dmm module has a dmm_init() and a dmm_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')
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/dev.c | 6 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/dmm.c | 32 |
2 files changed, 0 insertions, 38 deletions
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c index 734d47ed9a8..c5e627ce8b8 100644 --- a/drivers/staging/tidspbridge/pmgr/dev.c +++ b/drivers/staging/tidspbridge/pmgr/dev.c | |||
@@ -657,9 +657,6 @@ int dev_get_bridge_context(struct dev_object *hdev_obj, | |||
657 | void dev_exit(void) | 657 | void dev_exit(void) |
658 | { | 658 | { |
659 | refs--; | 659 | refs--; |
660 | |||
661 | if (refs == 0) | ||
662 | dmm_exit(); | ||
663 | } | 660 | } |
664 | 661 | ||
665 | /* | 662 | /* |
@@ -671,9 +668,6 @@ bool dev_init(void) | |||
671 | { | 668 | { |
672 | bool ret = true; | 669 | bool ret = true; |
673 | 670 | ||
674 | if (refs == 0) | ||
675 | dmm_init(); | ||
676 | |||
677 | if (ret) | 671 | if (ret) |
678 | refs++; | 672 | refs++; |
679 | 673 | ||
diff --git a/drivers/staging/tidspbridge/pmgr/dmm.c b/drivers/staging/tidspbridge/pmgr/dmm.c index 83faff885f1..7c9f8391606 100644 --- a/drivers/staging/tidspbridge/pmgr/dmm.c +++ b/drivers/staging/tidspbridge/pmgr/dmm.c | |||
@@ -51,8 +51,6 @@ struct dmm_object { | |||
51 | spinlock_t dmm_lock; /* Lock to access dmm mgr */ | 51 | spinlock_t dmm_lock; /* Lock to access dmm mgr */ |
52 | }; | 52 | }; |
53 | 53 | ||
54 | /* ----------------------------------- Globals */ | ||
55 | static u32 refs; /* module reference count */ | ||
56 | struct map_page { | 54 | struct map_page { |
57 | u32 region_size:15; | 55 | u32 region_size:15; |
58 | u32 mapped_size:15; | 56 | u32 mapped_size:15; |
@@ -172,18 +170,6 @@ int dmm_delete_tables(struct dmm_object *dmm_mgr) | |||
172 | } | 170 | } |
173 | 171 | ||
174 | /* | 172 | /* |
175 | * ======== dmm_exit ======== | ||
176 | * Purpose: | ||
177 | * Discontinue usage of module; free resources when reference count | ||
178 | * reaches 0. | ||
179 | */ | ||
180 | void dmm_exit(void) | ||
181 | { | ||
182 | |||
183 | refs--; | ||
184 | } | ||
185 | |||
186 | /* | ||
187 | * ======== dmm_get_handle ======== | 173 | * ======== dmm_get_handle ======== |
188 | * Purpose: | 174 | * Purpose: |
189 | * Return the dynamic memory manager object for this device. | 175 | * Return the dynamic memory manager object for this device. |
@@ -206,24 +192,6 @@ int dmm_get_handle(void *hprocessor, struct dmm_object **dmm_manager) | |||
206 | } | 192 | } |
207 | 193 | ||
208 | /* | 194 | /* |
209 | * ======== dmm_init ======== | ||
210 | * Purpose: | ||
211 | * Initializes private state of DMM module. | ||
212 | */ | ||
213 | bool dmm_init(void) | ||
214 | { | ||
215 | bool ret = true; | ||
216 | |||
217 | if (ret) | ||
218 | refs++; | ||
219 | |||
220 | virtual_mapping_table = NULL; | ||
221 | table_size = 0; | ||
222 | |||
223 | return ret; | ||
224 | } | ||
225 | |||
226 | /* | ||
227 | * ======== dmm_map_memory ======== | 195 | * ======== dmm_map_memory ======== |
228 | * Purpose: | 196 | * Purpose: |
229 | * Add a mapping block to the reserved chunk. DMM assumes that this block | 197 | * Add a mapping block to the reserved chunk. DMM assumes that this block |