hw: cannot_instantiate_with_device_add_yet due to pointer props
commit1b111dc1216be2a89770fdc1ab3dfa8025957442
authorMarkus Armbruster <armbru@redhat.com>
Fri, 29 Nov 2013 09:43:44 +0000 (29 10:43 +0100)
committerAndreas Färber <afaerber@suse.de>
Tue, 24 Dec 2013 16:27:17 +0000 (24 17:27 +0100)
tree22f63616a146378c5d4c2997f36e93dc30b102f7
parent061e84f7a469ad1f94f3b5f6a5361b346ab990e8
hw: cannot_instantiate_with_device_add_yet due to pointer props

Pointer properties can be set only by code, not by device_add.  A
device with a pointer property can work with device_add only when the
property may remain null.

This is the case for property "interrupt_vector" of device
"etraxfs,pic".  Add a comment there.

Set cannot_instantiate_with_device_add_yet for the other devices with
pointer properties, with a comment explaining why.

Juha Riihimäki and Peter Maydell deserve my thanks for making "pointer
property must not remain null" blatantly obvious in the OMAP devices.

Only device "smbus-eeprom" is actually changed.  The others are all
sysbus devices, which get cannot_instantiate_with_device_add_yet set
in their abstract base's class init function.  Setting it again in
their class init function is technically redundant, but serves as
insurance for when sysbus devices become available with device_add,
and as documentation.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> (for ETRAX)
Signed-off-by: Andreas Färber <afaerber@suse.de>
hw/audio/marvell_88w8618.c
hw/dma/sparc32_dma.c
hw/gpio/omap_gpio.c
hw/i2c/omap_i2c.c
hw/i2c/smbus_eeprom.c
hw/intc/etraxfs_pic.c
hw/intc/grlib_irqmp.c
hw/intc/omap_intc.c
hw/net/etraxfs_eth.c
hw/net/lance.c