Blob Blame Raw
From 300a7cf7103f2bad1767dbb9f4a805bb2199fb7f Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru@redhat.com>
Date: Sat, 2 Nov 2013 15:39:00 +0100
Subject: [PATCH 62/81] rhel: Make "pci-serial-2x" and "pci-serial-4x" device unavailable

RH-Author: Markus Armbruster <armbru@redhat.com>
Message-id: <1383406740-6461-2-git-send-email-armbru@redhat.com>
Patchwork-id: 55276
O-Subject: [PATCH 7.0 qemu-kvm 1/1] rhel: Make "pci-serial-2x" and "pci-serial-4x" device unavailable
Bugzilla: 1001180
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Bandan Das <bsd@redhat.com>

From: Markus Armbruster <armbru@redhat.com>

We can't just drop CONFIG_SERIAL_PCI, because we still want
"pci-serial".  Instead, make them unavailable with -device /
device_add.  Suffices, because there's no other way to get it: the
device model defines no external symbols, and the driver name doesn't
occur in code outside the device model.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/char/serial-pci.c | 4 ++++
 1 file changed, 4 insertions(+)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/char/serial-pci.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
index 77fec01..bfe686b 100644
--- a/hw/char/serial-pci.c
+++ b/hw/char/serial-pci.c
@@ -207,6 +207,8 @@ static void multi_2x_serial_pci_class_initfn(ObjectClass *klass, void *data)
     dc->vmsd = &vmstate_pci_multi_serial;
     dc->props = multi_2x_serial_pci_properties;
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
+    /* Disabled for Red Hat Enterprise Linux: */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static void multi_4x_serial_pci_class_initfn(ObjectClass *klass, void *data)
@@ -222,6 +224,8 @@ static void multi_4x_serial_pci_class_initfn(ObjectClass *klass, void *data)
     dc->vmsd = &vmstate_pci_multi_serial;
     dc->props = multi_4x_serial_pci_properties;
     set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
+    /* Disabled for Red Hat Enterprise Linux: */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo serial_pci_info = {
-- 
1.7.1