remoteproc: simplify unregister/free interfaces

Simplify the unregister/free interfaces, and make them easier
to understand and use, by moving to a symmetric and consistent
alloc() -> register() -> unregister() -> free() flow.

To create and register an rproc instance, one needed to invoke
rproc_alloc() followed by rproc_register().

To unregister and free an rproc instance, one now needs to invoke
rproc_unregister() followed by rproc_free().

Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
This commit is contained in:
Ohad Ben-Cohen
2012-07-02 11:41:16 +03:00
parent 7183a2a799
commit c6b5a27628
3 changed files with 20 additions and 31 deletions

View File

@@ -214,7 +214,10 @@ static int __devexit omap_rproc_remove(struct platform_device *pdev)
{
struct rproc *rproc = platform_get_drvdata(pdev);
return rproc_unregister(rproc);
rproc_unregister(rproc);
rproc_free(rproc);
return 0;
}
static struct platform_driver omap_rproc_driver = {