diff options
author | Juan Gutierrez <jgutierrez@ti.com> | 2011-12-16 13:05:19 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-01-09 08:39:19 +0800 |
commit | 9f6b214ffe468b131dfd30fbf57340a29510e919 (patch) | |
tree | 9001bf085d3dd04bc47c6c88204b7dbe75230530 | |
parent | 4c536f7744655bf48a92243108c889a5de6aae4a (diff) |
omap: remoteproc: return rproc status instead of omap device status
rproc_get_state was returning omap_device status instead of
the current rproc status. This mismatch was leading to some
unhandled states like when the remote proc is hibernated. This
was causing users-space registration for PROC_START events to
timeout, due to the mismatch states.
Change-Id: I90601d7d69be73f0ca3031dbe0d1254d545c8bf4
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
-rw-r--r-- | arch/arm/plat-omap/remoteproc.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/remoteproc.c b/arch/arm/plat-omap/remoteproc.c index 6cd2aff8a2b..0ad64e222d1 100644 --- a/arch/arm/plat-omap/remoteproc.c +++ b/arch/arm/plat-omap/remoteproc.c @@ -166,15 +166,10 @@ EXPORT_SYMBOL_GPL(rproc_wakeup); static inline int rproc_get_state(struct omap_rproc *rproc) { - struct omap_rproc_platform_data *pdata; - if (!rproc->dev) - return -EINVAL; - - pdata = rproc->dev->platform_data; - if (!pdata->ops) + if (WARN_ON(rproc == NULL)) return -EINVAL; - return pdata->ops->get_state(rproc->dev); + return rproc->state; } static int rproc_reg_user_event(struct omap_rproc *rproc, |