linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ohad@wizery.com (Ohad Ben-Cohen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] remoteproc: avoid registering a virtio device if not supported
Date: Wed, 14 Dec 2011 13:48:30 +0200	[thread overview]
Message-ID: <1323863315-8159-3-git-send-email-ohad@wizery.com> (raw)
In-Reply-To: <1323863315-8159-1-git-send-email-ohad@wizery.com>

From: Mark Grosen <mgrosen@ti.com>

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 at wizery.com: write commit log]

Signed-off-by: Mark Grosen <mgrosen@ti.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
 drivers/remoteproc/remoteproc_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 0d9a955..080c056 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -695,7 +695,7 @@ static int
 rproc_handle_virtio_rsc(struct rproc *rproc, struct fw_resource *rsc, int len)
 {
 	struct device *dev = rproc->dev;
-	int ret = 0;
+	int ret = -ENODEV;
 
 	for (; len >= sizeof(*rsc); rsc++, len -= sizeof(*rsc))
 		if (rsc->type == RSC_VIRTIO_DEV) {
-- 
1.7.5.4

  parent reply	other threads:[~2011-12-14 11:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 11:48 [PATCH 0/7] remoteproc/rpmsg: a few trivial fixes Ohad Ben-Cohen
2011-12-14 11:48 ` [PATCH 1/7] remoteproc: do not require an iommu Ohad Ben-Cohen
2011-12-14 11:48 ` Ohad Ben-Cohen [this message]
2011-12-14 11:48 ` [PATCH 3/7] remoteproc: remove unused resource type Ohad Ben-Cohen
2011-12-14 11:48 ` [PATCH 4/7] remoteproc/omap: utilize module_platform_driver Ohad Ben-Cohen
2011-12-14 11:48 ` [PATCH 5/7] remoteproc: look for truncated firmware images Ohad Ben-Cohen
2011-12-14 11:48 ` [PATCH 6/7] remoteproc: add Kconfig menu Ohad Ben-Cohen
2011-12-14 11:48 ` [PATCH 7/7] rpmsg: " Ohad Ben-Cohen
2011-12-21 11:29 ` [PATCH 0/7] remoteproc/rpmsg: a few trivial fixes Ohad Ben-Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323863315-8159-3-git-send-email-ohad@wizery.com \
    --to=ohad@wizery.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).