From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QapZ1-00016A-5P for qemu-devel@nongnu.org; Sun, 26 Jun 2011 09:39:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QapYz-0006kT-Un for qemu-devel@nongnu.org; Sun, 26 Jun 2011 09:39:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QapYz-0006kF-Ah for qemu-devel@nongnu.org; Sun, 26 Jun 2011 09:39:49 -0400 Date: Sun, 26 Jun 2011 16:39:56 +0300 From: "Michael S. Tsirkin" Message-ID: <20110626133956.GA7902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] xen: move to new pci initializers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony PERARD , Steven Smith , Alexander Graf , Stefano Stabellini move ids to pci info structure Signed-off-by: Michael S. Tsirkin Untested. --- hw/xen_platform.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/xen_platform.c b/hw/xen_platform.c index 9a01735..f43e175 100644 --- a/hw/xen_platform.c +++ b/hw/xen_platform.c @@ -290,18 +290,10 @@ static int xen_platform_initfn(PCIDevice *dev) pci_conf = d->pci_dev.config; - pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_XEN); - pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_XEN_PLATFORM); - pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, PCI_VENDOR_ID_XEN); - pci_set_word(pci_conf + PCI_SUBSYSTEM_ID, PCI_DEVICE_ID_XEN_PLATFORM); - pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY); - pci_config_set_revision(pci_conf, 1); pci_config_set_prog_interface(pci_conf, 0); - pci_config_set_class(pci_conf, PCI_CLASS_OTHERS << 8 | 0x80); - pci_conf[PCI_INTERRUPT_PIN] = 1; pci_register_bar(&d->pci_dev, 0, 0x100, @@ -330,6 +322,13 @@ static PCIDeviceInfo xen_platform_info = { .qdev.size = sizeof(PCIXenPlatformState), .qdev.vmsd = &vmstate_xen_platform, .qdev.reset = platform_reset, + + .vendor_id = PCI_VENDOR_ID_XEN, + .device_id = PCI_DEVICE_ID_XEN_PLATFORM, + .class_id = PCI_CLASS_OTHERS << 8 | 0x80, + .subsystem_vendor_id = PCI_VENDOR_ID_XEN, + .subsystem_id = PCI_DEVICE_ID_XEN_PLATFORM, + .revision = 1, }; static void xen_platform_register(void) -- 1.7.5.53.gc233e