[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] vl: Eliminate usb_enabled()
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] vl: Eliminate usb_enabled() |
Date: |
Wed, 8 Jun 2016 14:34:16 +0100 |
On 8 June 2016 at 12:48, Paolo Bonzini <address@hidden> wrote:
> ----- Original Message -----
>> From: "Marcel Apfelbaum" <address@hidden>
>> To: "Eduardo Habkost" <address@hidden>, address@hidden
>> Cc: "Paolo Bonzini" <address@hidden>, "Andrzej Zaborowski" <address@hidden>,
>> "Peter Maydell"
>> <address@hidden>, "Michael S. Tsirkin" <address@hidden>, "Alexander Graf"
>> <address@hidden>
>> 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