From 97dd98de46d44cee839553c8b2f2bb79fd1764b5 Mon Sep 17 00:00:00 2001 From: Kitae Kim Date: Fri, 22 Nov 2013 19:38:04 +0900 Subject: [PATCH] hwkey: added reset feature. initialize numbers of buffers in the virtqueue when reset state. Change-Id: I72c40e156ca3fa16e33f732505cd7ca012139122 Signed-off-by: Kitae Kim --- tizen/src/hw/maru_virtio_hwkey.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tizen/src/hw/maru_virtio_hwkey.c b/tizen/src/hw/maru_virtio_hwkey.c index 6ee4a5b..421c1e5 100644 --- a/tizen/src/hw/maru_virtio_hwkey.c +++ b/tizen/src/hw/maru_virtio_hwkey.c @@ -231,12 +231,19 @@ static int virtio_hwkey_device_exit(DeviceState *qdev) return 0; } +static void virtio_hwkey_device_reset(VirtIODevice *vdev) +{ + INFO("reset hwkey device\n"); + vqidx = 0; +} + static void virtio_hwkey_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); dc->exit = virtio_hwkey_device_exit; vdc->init = virtio_hwkey_device_init; + vdc->reset = virtio_hwkey_device_reset; vdc->get_features = virtio_hwkey_get_features; } -- 2.7.4