Commit 4bcbe0b6 authored by Eduardo Habkost's avatar Eduardo Habkost Committed by Gerd Hoffmann
Browse files

vl: Eliminate usb_enabled()



This wrapper for machine_usb(current_machine) is not necessary,
replace all usages of usb_enabled() with machine_usb().

Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: qemu-arm@nongnu.org
Cc: qemu-ppc@nongnu.org
Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Reviewed-by: default avatarMarcel Apfelbaum <marcel@redhat.com>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Message-id: 1465419025-21519-3-git-send-email-ehabkost@redhat.com
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent c92cfba8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1351,7 +1351,7 @@ static void n8x0_init(MachineState *machine,
    n8x0_dss_setup(s);
    n8x0_cbus_setup(s);
    n8x0_uart_setup(s);
    if (usb_enabled()) {
    if (machine_usb(machine)) {
        n8x0_usb_setup(s);
    }

+1 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ static void realview_init(MachineState *machine,
        sysbus_connect_irq(busdev, 2, pic[50]);
        sysbus_connect_irq(busdev, 3, pic[51]);
        pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci");
        if (usb_enabled()) {
        if (machine_usb(machine)) {
            pci_create_simple(pci_bus, -1, "pci-ohci");
        }
        n = drive_get_max_bus(IF_SCSI);
+1 −1
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ static void versatile_init(MachineState *machine, int board_id)
            pci_nic_init_nofail(nd, pci_bus, "rtl8139", NULL);
        }
    }
    if (usb_enabled()) {
    if (machine_usb(machine)) {
        pci_create_simple(pci_bus, -1, "pci-ohci");
    }
    n = drive_get_max_bus(IF_SCSI);
+1 −1
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ static void pc_init1(MachineState *machine,

    pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state);

    if (pcmc->pci_enabled && usb_enabled()) {
    if (pcmc->pci_enabled && machine_usb(machine)) {
        pci_create_simple(pci_bus, piix3_devfn + 2, "piix3-usb-uhci");
    }

+1 −1
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ static void pc_q35_init(MachineState *machine)
    ide_drive_get(hd, ICH_AHCI(ahci)->ahci.ports);
    ahci_ide_create_devs(ahci, hd);

    if (usb_enabled()) {
    if (machine_usb(machine)) {
        /* Should we create 6 UHCI according to ich9 spec? */
        ehci_create_ich9_with_companions(host_bus, 0x1d);
    }
Loading