From ca6e32bce33eab1000eba5629e28832430896cbd Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 9 Oct 2017 12:32:37 +0200 Subject: [PATCH 18/34] usb: drop HOST_USB RH-Author: Thomas Huth Message-id: <1507552368-9245-2-git-send-email-thuth@redhat.com> Patchwork-id: 77016 O-Subject: [RHEL-7.5 qemu-kvm-ma PATCH 01/12] usb: drop HOST_USB Bugzilla: 1492033 RH-Acked-by: Cornelia Huck RH-Acked-by: David Gibson RH-Acked-by: Miroslav Rezanina From: Gerd Hoffmann Nowdays we use libusb for usb-host, so we don't have different code for linux vs. bsd any more. So there is little reason to have the HOST_USB variable, we can just write things directly into the Makefile and avoid a pointless indirection. Signed-off-by: Gerd Hoffmann Reviewed-by: Fam Zheng Reviewed-by: Thomas Huth Message-id: 20170908111217.21985-2-kraxel@redhat.com (cherry picked from commit 4e5ee5b21c84fe3023a64b5cc2e12a52ab0597c1) Signed-off-by: Miroslav Rezanina Conflicts: configure (simple conflict in the context of the removed hunk) --- configure | 7 ------- hw/usb/Makefile.objs | 6 +++++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 5cb65d0..457b2ff 100755 --- a/configure +++ b/configure @@ -5968,13 +5968,6 @@ if test "$live_block_ops" = "yes" ; then echo "CONFIG_LIVE_BLOCK_OPS=y" >> $config_host_mak fi -# USB host support -if test "$libusb" = "yes"; then - echo "HOST_USB=libusb legacy" >> $config_host_mak -else - echo "HOST_USB=stub" >> $config_host_mak -fi - # TPM passthrough support? if test "$tpm" = "yes"; then echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs index 97f1c456..a43ebbc 100644 --- a/hw/usb/Makefile.objs +++ b/hw/usb/Makefile.objs @@ -38,7 +38,11 @@ endif common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o # usb pass-through -common-obj-y += $(patsubst %,host-%.o,$(HOST_USB)) +ifeq ($(CONFIG_LIBUSB),y) +common-obj-y += host-libusb.o host-legacy.o +else +common-obj-y += host-stub.o +endif ifeq ($(CONFIG_USB_LIBUSB),y) common-obj-$(CONFIG_XEN) += xen-usb.o -- 1.8.3.1