qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v1 5/8] xilinx_zynq: add USB controllers
Date: Fri, 26 Oct 2012 08:49:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.8) Gecko/20121012 Thunderbird/10.0.8

  Hi,

>> @@ -1312,29 +1320,24 @@ static TypeInfo piix3_uhci_info = {
>>      .name          = "piix3-usb-uhci",
>>      .parent        = TYPE_PCI_DEVICE,
>>      .instance_size = sizeof(UHCIState),
>> -    .class_init    = piix3_uhci_class_init,
>> +    .class_init    = uhci_class_init,
> 
> Therese three elements (parent, instance_size, class_init) are
> repeated from one definition to the next. This will get tedious when
> we eventually come to make the same fix for some of the other devices
> that have large numbers of variants (pflash_cfi0x and m25p80 being
> some of the angrier ones).

I think we can also create TypeInfo at runtime (uhci_register_types in
the uhci case).  We'll just have to stick the name into UHCIInfo, build
a static uhciinfo array, then generate & register TypeInfo from that.

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]