summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Gutierrez <jgutierrez@ti.com>2011-10-25 10:51:41 +0800
committerAndy Green <andy.green@linaro.org>2011-10-25 10:51:41 +0800
commitaaf3f6a8f18d48cb1dd61fca55021e5b1bed4e1a (patch)
treec52eab8f8d94fa6416b9129a43deecfe4d6539c0
parent31fe244ba684a6ae4b13f8d87942f8847ce62c83 (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.c9
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,