virtio-input.c (760df0d121a836dcbf3726b80b820115aef21b30) virtio-input.c (b69c3c21a5d11075d42100d5cfe0a736593fae6b)
1/*
2 * This work is licensed under the terms of the GNU GPL, version 2 or
3 * (at your option) any later version. See the COPYING file in the
4 * top-level directory.
5 */
6
7#include "qemu/osdep.h"
8#include "qapi/error.h"

--- 262 unchanged lines hidden (view full) ---

271 QTAILQ_FOREACH_SAFE(cfg, &vinput->cfg_list, node, next) {
272 QTAILQ_REMOVE(&vinput->cfg_list, cfg, node);
273 g_free(cfg);
274 }
275
276 g_free(vinput->queue);
277}
278
1/*
2 * This work is licensed under the terms of the GNU GPL, version 2 or
3 * (at your option) any later version. See the COPYING file in the
4 * top-level directory.
5 */
6
7#include "qemu/osdep.h"
8#include "qapi/error.h"

--- 262 unchanged lines hidden (view full) ---

271 QTAILQ_FOREACH_SAFE(cfg, &vinput->cfg_list, node, next) {
272 QTAILQ_REMOVE(&vinput->cfg_list, cfg, node);
273 g_free(cfg);
274 }
275
276 g_free(vinput->queue);
277}
278
279static void virtio_input_device_unrealize(DeviceState *dev, Error **errp)
279static void virtio_input_device_unrealize(DeviceState *dev)
280{
281 VirtIOInputClass *vic = VIRTIO_INPUT_GET_CLASS(dev);
282 VirtIODevice *vdev = VIRTIO_DEVICE(dev);
283 VirtIOInput *vinput = VIRTIO_INPUT(dev);
280{
281 VirtIOInputClass *vic = VIRTIO_INPUT_GET_CLASS(dev);
282 VirtIODevice *vdev = VIRTIO_DEVICE(dev);
283 VirtIOInput *vinput = VIRTIO_INPUT(dev);
284 Error *local_err = NULL;
285
286 if (vic->unrealize) {
284
285 if (vic->unrealize) {
287 vic->unrealize(dev, &local_err);
288 if (local_err) {
289 error_propagate(errp, local_err);
290 return;
291 }
286 vic->unrealize(dev);
292 }
293 virtio_delete_queue(vinput->evt);
294 virtio_delete_queue(vinput->sts);
295 virtio_cleanup(vdev);
296}
297
298static const VMStateDescription vmstate_virtio_input = {
299 .name = "virtio-input",

--- 49 unchanged lines hidden ---
287 }
288 virtio_delete_queue(vinput->evt);
289 virtio_delete_queue(vinput->sts);
290 virtio_cleanup(vdev);
291}
292
293static const VMStateDescription vmstate_virtio_input = {
294 .name = "virtio-input",

--- 49 unchanged lines hidden ---