From patchwork Mon Sep 27 16:32:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: virtio: invoke set_status callback on reset Date: Mon, 27 Sep 2010 06:32:52 -0000 From: "Michael S. Tsirkin" X-Patchwork-Id: 65880 Message-Id: <20100927163252.GA7071@redhat.com> To: qemu-devel@nongnu.org, Anthony Liguori , Alex Williamson Cc: As status is set to 0 on reset, invoke the relevant callback. This makes for a cleaner code in devices as they don't need to duplicate the code in their reset routine, as well as excercises this path a little more. Signed-off-by: Michael S. Tsirkin --- hw/virtio.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 4475bb3..d7b5853 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -443,6 +443,8 @@ void virtio_reset(void *opaque) VirtIODevice *vdev = opaque; int i; + virtio_set_status(vdev, 0); + if (vdev->reset) vdev->reset(vdev);