On 8 June 2016 at 12:48, Paolo Bonzini <pbonz...@redhat.com> wrote:
> ----- Original Message -----
>> From: "Marcel Apfelbaum" <mar...@redhat.com>
>> To: "Eduardo Habkost" <ehabk...@redhat.com>, qemu-devel@nongnu.org
>> Cc: "Paolo Bonzini" <pbonz...@redhat.com>, "Andrzej Zaborowski" 
>> <balr...@gmail.com>, "Peter Maydell"
>> <peter.mayd...@linaro.org>, "Michael S. Tsirkin" <m...@redhat.com>, 
>> "Alexander Graf" <ag...@suse.de>
>> Sent: Wednesday, June 8, 2016 1:25:41 PM
>> Subject: Re: [PATCH] vl: Eliminate usb_enabled()
>>
>> On 06/07/2016 07:56 PM, Eduardo Habkost wrote:
>> > @@ -2062,6 +2063,7 @@ PXA2xxState *pxa270_init(MemoryRegion *address_space,
>> >       int i;
>> >       DriveInfo *dinfo;
>> >       s = g_new0(PXA2xxState, 1);
>> > +    MachineState *machine = MACHINE(qdev_get_machine());
>> >
>>
>> All the callers of pxa270_init have a reference to the machine,
>> you can pass it as parameter IMO.
>
> Another possibility is to pass a "bool usb_enabled" argument.

Or we could just create the USB controller always -- this
is a part of the SoC, not a removable pluggable device,
so it doesn't make much sense for the user to be able
to create a system where it's not present.

thanks
-- PMM

Reply via email to