diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2014-12-04 13:20:27 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-12-09 09:32:32 -0500 |
commit | 5c609a5ef05d98e26778824ba84581fe5e400db6 (patch) | |
tree | 487da89e8ad7ef9d3bcb485ae877518f1669e18b /drivers/remoteproc | |
parent | ce15408f350c4b97635618692a45aedabfdd2696 (diff) |
virtio: allow finalize_features to fail
This will make it easy for transports to validate features and return
failure.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc_virtio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index 627737ee7632..e1a10232a943 100644 --- a/drivers/remoteproc/remoteproc_virtio.c +++ b/drivers/remoteproc/remoteproc_virtio.c | |||
@@ -217,7 +217,7 @@ static u64 rproc_virtio_get_features(struct virtio_device *vdev) | |||
217 | return rsc->dfeatures; | 217 | return rsc->dfeatures; |
218 | } | 218 | } |
219 | 219 | ||
220 | static void rproc_virtio_finalize_features(struct virtio_device *vdev) | 220 | static int rproc_virtio_finalize_features(struct virtio_device *vdev) |
221 | { | 221 | { |
222 | struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); | 222 | struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); |
223 | struct fw_rsc_vdev *rsc; | 223 | struct fw_rsc_vdev *rsc; |
@@ -235,6 +235,8 @@ static void rproc_virtio_finalize_features(struct virtio_device *vdev) | |||
235 | * to the remote processor once it is powered on. | 235 | * to the remote processor once it is powered on. |
236 | */ | 236 | */ |
237 | rsc->gfeatures = vdev->features; | 237 | rsc->gfeatures = vdev->features; |
238 | |||
239 | return 0; | ||
238 | } | 240 | } |
239 | 241 | ||
240 | static void rproc_virtio_get(struct virtio_device *vdev, unsigned offset, | 242 | static void rproc_virtio_get(struct virtio_device *vdev, unsigned offset, |