mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
pcspk: convert "pit" property type from ptr to link
The speaker device needs pointer to ISA PIT device to operate. But according to qdev-properties.h, properties of pointer type should be avoided. It seems a link type property is a good substitution. Signed-off-by: Efimov Vasily <real@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
e8ad4d1680
commit
873b4d3f05
2 changed files with 8 additions and 3 deletions
|
@ -38,7 +38,7 @@ static inline ISADevice *pcspk_init(ISABus *bus, ISADevice *pit)
|
|||
isadev = isa_create(bus, TYPE_PC_SPEAKER);
|
||||
dev = DEVICE(isadev);
|
||||
qdev_prop_set_uint32(dev, "iobase", 0x61);
|
||||
qdev_prop_set_ptr(dev, "pit", pit);
|
||||
object_property_set_link(OBJECT(dev), OBJECT(pit), "pit", NULL);
|
||||
qdev_init_nofail(dev);
|
||||
|
||||
return isadev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue