On 29/03/2016 09:47, xiaoqiang zhao wrote:
>  
>      /* FIXME use a qdev chardev prop instead of qemu_char_get_next_serial() 
> */
>      s->chr = qemu_char_get_next_serial();
>      if (s->chr) {
>          qemu_chr_add_handlers(s->chr, juart_can_rx, juart_rx, juart_event, 
> s);
>      }

This is wrong, for the usual reason that instance_init cannot touch
globals.  The right thing to do here would be to add a chardev property
to the device as in the FIXME; at this point, it is obvious that the
rest must be in a init or realize callback, because the properties are
not available in init.

Same for patch 4.

Paolo

Reply via email to