virtio: drop name parameter for virtio_init()
This patch drops the name parameter for the virtio_init function. The pair between the numeric device ID and the string device ID (name) of a virtio device already exists, but not in a way that lets us map between them. This patch lets us do this and removes the need for the name parameter in the virtio_init function. Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com> Message-Id: <1648819405-25696-2-git-send-email-jonah.palmer@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
503e355465
commit
3857cd5c7f
24 changed files with 77 additions and 43 deletions
|
|
@ -44,7 +44,7 @@ int vhost_vsock_common_start(VirtIODevice *vdev);
|
|||
void vhost_vsock_common_stop(VirtIODevice *vdev);
|
||||
int vhost_vsock_common_pre_save(void *opaque);
|
||||
int vhost_vsock_common_post_load(void *opaque, int version_id);
|
||||
void vhost_vsock_common_realize(VirtIODevice *vdev, const char *name);
|
||||
void vhost_vsock_common_realize(VirtIODevice *vdev);
|
||||
void vhost_vsock_common_unrealize(VirtIODevice *vdev);
|
||||
uint64_t vhost_vsock_common_get_features(VirtIODevice *vdev, uint64_t features,
|
||||
Error **errp);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include "sysemu/vhost-user-backend.h"
|
||||
|
||||
#include "standard-headers/linux/virtio_gpu.h"
|
||||
#include "standard-headers/linux/virtio_ids.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_VIRTIO_GPU_BASE "virtio-gpu-base"
|
||||
|
|
@ -37,8 +38,6 @@ OBJECT_DECLARE_SIMPLE_TYPE(VirtIOGPUGL, VIRTIO_GPU_GL)
|
|||
#define TYPE_VHOST_USER_GPU "vhost-user-gpu"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(VhostUserGPU, VHOST_USER_GPU)
|
||||
|
||||
#define VIRTIO_ID_GPU 16
|
||||
|
||||
struct virtio_gpu_simple_resource {
|
||||
uint32_t resource_id;
|
||||
uint32_t width;
|
||||
|
|
|
|||
|
|
@ -165,8 +165,8 @@ struct VirtioDeviceClass {
|
|||
void virtio_instance_init_common(Object *proxy_obj, void *data,
|
||||
size_t vdev_size, const char *vdev_name);
|
||||
|
||||
void virtio_init(VirtIODevice *vdev, const char *name,
|
||||
uint16_t device_id, size_t config_size);
|
||||
void virtio_init(VirtIODevice *vdev, uint16_t device_id, size_t config_size);
|
||||
|
||||
void virtio_cleanup(VirtIODevice *vdev);
|
||||
|
||||
void virtio_error(VirtIODevice *vdev, const char *fmt, ...) G_GNUC_PRINTF(2, 3);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue