On 06/03/18 17:47, Thomas Huth wrote:

It seems that the error is being raised when setting the property rather
than during realize so I'm not sure what I can do to handle this. Any
thoughts?


Does the device need to be hot-pluggable or even user_creatable at all?
It seems like it is also using serial_hds[] directly, so that is a good
indication that it is *not* user creatable. So maybe the easiest fix is
to simply set

        dc->user_creatable = false;

in macio_class_init() ?

(Added Daniel to CC)

I believe it should fail anyhow during realize because both macio devices (newworld and oldworld) requires an object link to the PIC which won't be set when using device_add via the monitor as in your example.

But it still doesn't quite feel right that just setting a property value should abort() immediately. Daniel, any thoughts?


ATB,

Mark.

Reply via email to