diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2012-07-02 04:41:16 -0400 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2012-07-05 17:53:25 -0400 |
commit | c6b5a27628faf6657b741d828a1462d832d0dbc5 (patch) | |
tree | 3f5bcb10c6d2b1e395330536476d471415632832 /drivers/remoteproc/omap_remoteproc.c | |
parent | 7183a2a799b81490354973117ecd810c23cdc668 (diff) |
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>
Diffstat (limited to 'drivers/remoteproc/omap_remoteproc.c')
-rw-r--r-- | drivers/remoteproc/omap_remoteproc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index b5e6d2981741..4f2fe8fd7fe6 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c | |||
@@ -214,7 +214,10 @@ static int __devexit omap_rproc_remove(struct platform_device *pdev) | |||
214 | { | 214 | { |
215 | struct rproc *rproc = platform_get_drvdata(pdev); | 215 | struct rproc *rproc = platform_get_drvdata(pdev); |
216 | 216 | ||
217 | return rproc_unregister(rproc); | 217 | rproc_unregister(rproc); |
218 | rproc_free(rproc); | ||
219 | |||
220 | return 0; | ||
218 | } | 221 | } |
219 | 222 | ||
220 | static struct platform_driver omap_rproc_driver = { | 223 | static struct platform_driver omap_rproc_driver = { |