usb-host: cleanups
cover usb-host: cleanups
Gerd Hoffmann (2):
usb: drop HOST_USB
usb: only build usb-host with CONFIG_USB=y
configure | 7 ------- hw/usb/Makefile.objs | 6 +++++- 2 files changed, 5 insertions(+), 8 deletions(-)
Signature · 1 line
2.9.3
PATCH 1/2 usb: drop HOST_USB
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.
--- configure | 7 ------- hw/usb/Makefile.objs | 6 +++++- 2 files changed, 5 insertions(+), 8 deletions(-)
configure +0 -7
@@ -5978,13 +5978,6 @@ if test "$live_block_migration" = "yes" ; then echo "CONFIG_LIVE_BLOCK_MIGRATION=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
hw/usb/Makefile.objs +5 -1
@@ -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
Signature · 1 line
2.9.3
Re: [Qemu-devel] [PATCH 1/2] usb: drop HOST_USB
Quoted 36 lines · 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_USBvariable, we can just write things directly into theMakefileand avoid a pointless indirection.Signed-off-by Gerd Hoffmann <[email protected]>--- configure | 7 ------- hw/usb/Makefile.objs | 6 +++++- 2 files changed, 5 insertions(+), 8 deletions(-)configure +0
-7@@ -5978,13 +5978,6 @@ if test "$live_block_migration" = "yes" ; then echo "CONFIG_LIVE_BLOCK_MIGRATION=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_makhw/usb/Makefile.objs +0
-0@@ -38,7 +38,11 @@ endif common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
hw/usb/Makefile.objs endif · line 48
Quoted 10 lines
hw/usb/Makefile.objs +5
-1# 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
PATCH 2/2 usb: only build usb-host with CONFIG_USB=y
In reply to Gerd Hoffmann--- hw/usb/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/usb/Makefile.objs +1 -1
@@ -38,7 +38,7 @@ endif common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o # usb pass-through -ifeq ($(CONFIG_LIBUSB),y) +ifeq ($(CONFIG_LIBUSB)$(CONFIG_USB),yy) common-obj-y += host-libusb.o host-legacy.o else common-obj-y += host-stub.o
Signature · 1 line
2.9.3
Re: [Qemu-devel] [PATCH 2/2] usb: only build usb-host with CONFIG_USB=y
Quoted 10 lines · Gerd Hoffmann
Signed-off-by Gerd Hoffmann <[email protected]>--- hw/usb/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/usb/Makefile.objs +0
-0
hw/usb/Makefile.objs endif · line 44
Quoted 8 lines
hw/usb/Makefile.objs +1
-1@@ -38,7 +38,7 @@ endif common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o # usb pass-through -ifeq ($(CONFIG_LIBUSB),y) +ifeq ($(CONFIG_LIBUSB)$(CONFIG_USB),yy) common-obj-y += host-libusb.o host-legacy.o else common-obj-y += host-stub.o
Strange that you did not need the hack with "common-obj-$(CONFIG_ALL)" in this patch like I had to do in the patch that I sent today... but I've just checked it, and it seems to work this way. So:
Quoted 5 lines · Gerd Hoffmann
Gerd Hoffmann (2):
usb: dropHOST_USB
usb: only build usb-host withCONFIG_USB=y