From ece29df33b8e0e35760c4f76b0cf7b1af928b0b4 Mon Sep 17 00:00:00 2001 From: BALATON Zoltan Date: Mon, 25 Oct 2021 13:33:49 +0200 Subject: usb/uhci: Disallow user creating a vt82c686-uhci-pci device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because this device only works as part of VIA superio chips set user creatable to false. Since the class init method is common for UHCI variants introduce a flag in UHCIInfo for this. Signed-off-by: BALATON Zoltan Reviewed-by: Gerd Hoffmann Message-Id: Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-uhci.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hw/usb/hcd-uhci.c') diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index c557566ec2..7d26e35194 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -1282,6 +1282,9 @@ void uhci_data_class_init(ObjectClass *klass, void *data) } else { device_class_set_props(dc, uhci_properties_standalone); } + if (info->notuser) { + dc->user_creatable = false; + } u->info = *info; } -- cgit 1.4.1