aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-12-11 17:05:06 -0500
committerEduardo Habkost <ehabkost@redhat.com>2020-12-15 10:02:07 -0500
commit828ade86ee925c132496113e7f88b22162d92ec5 (patch)
tree47bc5ecbf809d27330a09555c21bea5d605ddf46 /hw/vfio
parent605d9fc0e307fb105d539e968b12bb0c46436bfa (diff)
qdev: Make qdev_get_prop_ptr() get Object* arg
Make the code more generic and not specific to TYPE_DEVICE. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> #s390 parts Acked-by: Paul Durrant <paul@xen.org> Message-Id: <20201211220529.2290218-10-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/vfio')
-rw-r--r--hw/vfio/pci-quirks.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
index 57150913b7..53569925a2 100644
--- a/hw/vfio/pci-quirks.c
+++ b/hw/vfio/pci-quirks.c
@@ -1488,9 +1488,8 @@ static void get_nv_gpudirect_clique_id(Object *obj, Visitor *v,
const char *name, void *opaque,
Error **errp)
{
- DeviceState *dev = DEVICE(obj);
Property *prop = opaque;
- uint8_t *ptr = qdev_get_prop_ptr(dev, prop);
+ uint8_t *ptr = qdev_get_prop_ptr(obj, prop);
visit_type_uint8(v, name, ptr, errp);
}
@@ -1501,7 +1500,7 @@ static void set_nv_gpudirect_clique_id(Object *obj, Visitor *v,
{
DeviceState *dev = DEVICE(obj);
Property *prop = opaque;
- uint8_t value, *ptr = qdev_get_prop_ptr(dev, prop);
+ uint8_t value, *ptr = qdev_get_prop_ptr(obj, prop);
if (dev->realized) {
qdev_prop_set_after_realize(dev, name, errp);