usb bugfixes.

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJZ1fWPAAoJEEy22O7T6HE4Fx0QAJE/0lxQfDL4eYAK6qwUE+Ou
 1Un3R1u8Nru9bpwH6boxcalSAjdiAMddwtT0bB6AnRE26ACSdYSBs8Ej1Bb84Xst
 y/lC11+BK90OniCwvGpOQgd2M47ol5QZDxWSWUv2UUfhNWBO6JiQYD1AGqH4fqra
 RYwiDHlipGJrRqc4TIWUkgacnsXmImoqNgDmM7E1VC6i98WVgb5+7pm0Y2pJ6vwV
 UqpZ8iKsGOGiFOVhycWANVkkVuGnAsKcJr5Cu7MWwWUJOt9ztcqTr2poi/OZfMSg
 tt47WAZalGy9YrTRdsPpFvesdMO/x02ThwjTeyvCJRVsLlDnB19zgpgbq4NvcB5B
 MuzwVFSBHNXX2ARA1mbpZDlj5loHZ9mfQhAfv7M67O0uHyLbcCuNfR4S54rrfRH2
 niKf0T8tH/z2ZiXxpwJcnxLdEkZzsyNdRuPUw6MFt5+YOASiQ15cSNCpS5qO+n2c
 P9Ca0TMmr2S+0en9FWkkNMyVHfHAWxhD0uhD03w3i13q2hmLqRijXRq8D8fTliNN
 CtiHDyPiG+cFUDXt6cs3r8nraNTdjveZU8GcB47/8IplHwjQvNzbGIXCdz+9o/tq
 oFAefK3hzgK2sW3ak2bwUayJnXbat6+aSuFYMoHDGh5kyW347WXCirXXch2O2m43
 SxeGFf/WiHEl3jXwRlII
 =6BCg
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/usb-20171005-pull-request' into staging

usb bugfixes.

# gpg: Signature made Thu 05 Oct 2017 10:04:15 BST
# gpg:                using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20171005-pull-request:
  usb: fix host-stub.c build race
  usb: Use angle brackets for cacard include directive
  usb: fix libusb config variable name.
  hw/usb/bus: Remove bad object_unparent() from usb_try_create_simple()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2017-10-05 15:31:06 +01:00
commit f43a46f0f4
3 changed files with 4 additions and 5 deletions

View File

@ -42,11 +42,12 @@ redirect.o-cflags = $(USB_REDIR_CFLAGS)
redirect.o-libs = $(USB_REDIR_LIBS)
# usb pass-through
ifeq ($(CONFIG_LIBUSB)$(CONFIG_USB),yy)
ifeq ($(CONFIG_USB_LIBUSB)$(CONFIG_USB),yy)
common-obj-y += host-libusb.o host-legacy.o
else
common-obj-y += host-stub.o
endif
common-obj-$(CONFIG_ALL) += host-stub.o
host-libusb.o-cflags := $(LIBUSB_CFLAGS)
host-libusb.o-libs := $(LIBUSB_LIBS)

View File

@ -341,9 +341,7 @@ static USBDevice *usb_try_create_simple(USBBus *bus, const char *name,
object_property_set_bool(OBJECT(dev), true, "realized", &err);
if (err) {
error_propagate(errp, err);
error_prepend(errp, "Failed to initialize USB device '%s': ",
name);
object_unparent(OBJECT(dev));
error_prepend(errp, "Failed to initialize USB device '%s': ", name);
return NULL;
}
return dev;

View File

@ -9,11 +9,11 @@
*/
#include "qemu/osdep.h"
#include <cacard/vscard_common.h>
#include "chardev/char-fe.h"
#include "qemu/error-report.h"
#include "qemu/sockets.h"
#include "ccid.h"
#include "cacard/vscard_common.h"
#define DPRINTF(card, lvl, fmt, ...) \
do { \