qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/usb: Disable 'usb-host' device when no USB is available in the target
@ 2017-09-08  7:47 Thomas Huth
  0 siblings, 0 replies; only message in thread
From: Thomas Huth @ 2017-09-08  7:47 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel
  Cc: Laurent Vivier, Cornelia Huck, David Hildenbrand

The 'usb-host' device currently also shows up in the "-device help"
list of all targets that do not support USB. That's ugly and kind of
confusing for the users. We should only provide this device if both,
the host and the target support USB.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/usb/Makefile.objs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
index 97f1c456..323d448 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -38,7 +38,9 @@ endif
 common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
 
 # usb pass-through
-common-obj-y += $(patsubst %,host-%.o,$(HOST_USB))
+common-obj-$(CONFIG_USB) += $(patsubst %,host-%.o,$(HOST_USB))
+common-obj-$(call lnot,$(CONFIG_USB)) += host-stub.o
+common-obj-$(CONFIG_ALL) += host-stub.o
 
 ifeq ($(CONFIG_USB_LIBUSB),y)
 common-obj-$(CONFIG_XEN) += xen-usb.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-08  7:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-08  7:47 [Qemu-devel] [PATCH] hw/usb: Disable 'usb-host' device when no USB is available in the target Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).