aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Grosen <mgrosen@ti.com>2011-12-13 02:14:15 -0500
committerOhad Ben-Cohen <ohad@wizery.com>2012-02-08 15:54:17 -0500
commit7d2d3956fbc1aa9a3ccdc9389b88505232764d4f (patch)
tree6c217bb8b541801b9e51a66d7ee1f8f47f6789e2
parent0798e1da7a1cc467f56bfa5149a0eede5ae38f72 (diff)
remoteproc: avoid registering a virtio device if not supported
Let remoteproc know when the firmware doesn't support any virtio functionality, so registering a virtio device can be avoided. This is needed for remote processors that doesn't require any virtio-based communications, but are still controlled via remoteproc. [ohad@wizery.com: write commit log] Signed-off-by: Mark Grosen <mgrosen@ti.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
-rw-r--r--drivers/remoteproc/remoteproc_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 0d9a9552c311..080c0569ef38 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -695,7 +695,7 @@ static int
695rproc_handle_virtio_rsc(struct rproc *rproc, struct fw_resource *rsc, int len) 695rproc_handle_virtio_rsc(struct rproc *rproc, struct fw_resource *rsc, int len)
696{ 696{
697 struct device *dev = rproc->dev; 697 struct device *dev = rproc->dev;
698 int ret = 0; 698 int ret = -ENODEV;
699 699
700 for (; len >= sizeof(*rsc); rsc++, len -= sizeof(*rsc)) 700 for (; len >= sizeof(*rsc); rsc++, len -= sizeof(*rsc))
701 if (rsc->type == RSC_VIRTIO_DEV) { 701 if (rsc->type == RSC_VIRTIO_DEV) {