mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 03:44:27 +08:00
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>
This commit is contained in:
parent
a71aa396ee
commit
d071c0e9ca
@ -61,10 +61,6 @@ extern int dmm_create(struct dmm_object **dmm_manager,
|
|||||||
struct dev_object *hdev_obj,
|
struct dev_object *hdev_obj,
|
||||||
const struct dmm_mgrattrs *mgr_attrts);
|
const struct dmm_mgrattrs *mgr_attrts);
|
||||||
|
|
||||||
extern bool dmm_init(void);
|
|
||||||
|
|
||||||
extern void dmm_exit(void);
|
|
||||||
|
|
||||||
extern int dmm_create_tables(struct dmm_object *dmm_mgr,
|
extern int dmm_create_tables(struct dmm_object *dmm_mgr,
|
||||||
u32 addr, u32 size);
|
u32 addr, u32 size);
|
||||||
|
|
||||||
|
@ -657,9 +657,6 @@ int dev_get_bridge_context(struct dev_object *hdev_obj,
|
|||||||
void dev_exit(void)
|
void dev_exit(void)
|
||||||
{
|
{
|
||||||
refs--;
|
refs--;
|
||||||
|
|
||||||
if (refs == 0)
|
|
||||||
dmm_exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -671,9 +668,6 @@ bool dev_init(void)
|
|||||||
{
|
{
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
|
|
||||||
if (refs == 0)
|
|
||||||
dmm_init();
|
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
refs++;
|
refs++;
|
||||||
|
|
||||||
|
@ -51,8 +51,6 @@ struct dmm_object {
|
|||||||
spinlock_t dmm_lock; /* Lock to access dmm mgr */
|
spinlock_t dmm_lock; /* Lock to access dmm mgr */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ----------------------------------- Globals */
|
|
||||||
static u32 refs; /* module reference count */
|
|
||||||
struct map_page {
|
struct map_page {
|
||||||
u32 region_size:15;
|
u32 region_size:15;
|
||||||
u32 mapped_size:15;
|
u32 mapped_size:15;
|
||||||
@ -171,18 +169,6 @@ int dmm_delete_tables(struct dmm_object *dmm_mgr)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* ======== dmm_exit ========
|
|
||||||
* Purpose:
|
|
||||||
* Discontinue usage of module; free resources when reference count
|
|
||||||
* reaches 0.
|
|
||||||
*/
|
|
||||||
void dmm_exit(void)
|
|
||||||
{
|
|
||||||
|
|
||||||
refs--;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ======== dmm_get_handle ========
|
* ======== dmm_get_handle ========
|
||||||
* Purpose:
|
* Purpose:
|
||||||
@ -205,24 +191,6 @@ int dmm_get_handle(void *hprocessor, struct dmm_object **dmm_manager)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* ======== dmm_init ========
|
|
||||||
* Purpose:
|
|
||||||
* Initializes private state of DMM module.
|
|
||||||
*/
|
|
||||||
bool dmm_init(void)
|
|
||||||
{
|
|
||||||
bool ret = true;
|
|
||||||
|
|
||||||
if (ret)
|
|
||||||
refs++;
|
|
||||||
|
|
||||||
virtual_mapping_table = NULL;
|
|
||||||
table_size = 0;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ======== dmm_map_memory ========
|
* ======== dmm_map_memory ========
|
||||||
* Purpose:
|
* Purpose:
|
||||||
|
Loading…
Reference in New Issue
Block a user