aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJuan Gutierrez <jgutierrez@ti.com>2011-07-07 15:42:09 -0400
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:19:19 -0400
commit41235edb43435cd5c87171e9b89f2bfcf4395cbc (patch)
treeb558411f1be382e11b136b6b84315059aa0d226a /arch
parent85d97a08d5ea13161d61d3e634bf617a7acd1263 (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>
Diffstat (limited to 'arch')
-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);
166 166
167static inline int rproc_get_state(struct omap_rproc *rproc) 167static inline int rproc_get_state(struct omap_rproc *rproc)
168{ 168{
169 struct omap_rproc_platform_data *pdata; 169 if (WARN_ON(rproc == NULL))
170 if (!rproc->dev)
171 return -EINVAL;
172
173 pdata = rproc->dev->platform_data;
174 if (!pdata->ops)
175 return -EINVAL; 170 return -EINVAL;
176 171
177 return pdata->ops->get_state(rproc->dev); 172 return rproc->state;
178} 173}
179 174
180static int rproc_reg_user_event(struct omap_rproc *rproc, 175static int rproc_reg_user_event(struct omap_rproc *rproc,