lkml.org 
[lkml]   [2011]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/7] remoteproc: avoid registering a virtio device if not supported
Date
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@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


\
 
 \ /
  Last update: 2011-12-14 12:51    [W:0.038 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site