From patchwork Tue May 17 16:55:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 95979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3491AB6EDF for ; Wed, 18 May 2011 03:02:47 +1000 (EST) Received: from localhost ([::1]:44887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMNfQ-0004qh-99 for incoming@patchwork.ozlabs.org; Tue, 17 May 2011 13:02:44 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMNZ1-0002LL-OB for qemu-devel@nongnu.org; Tue, 17 May 2011 12:56:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMNYx-0001KC-Jx for qemu-devel@nongnu.org; Tue, 17 May 2011 12:56:07 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:45301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMNYx-0001FW-9W for qemu-devel@nongnu.org; Tue, 17 May 2011 12:56:03 -0400 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id A7EB1280C0; Wed, 18 May 2011 01:56:02 +0900 (JST) Received: (nullmailer pid 3833 invoked by uid 1000); Tue, 17 May 2011 16:55:55 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org Date: Wed, 18 May 2011 01:55:38 +0900 Message-Id: X-Mailer: git-send-email 1.7.1.1 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 210.128.90.3 Cc: yamahata@valinux.co.jp, mst@redhat.com Subject: [Qemu-devel] [PATCH v2 21/38] hw/ivshmem.c: convert to PCIDeviceInfo to initialize ids X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata --- hw/ivshmem.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/ivshmem.c b/hw/ivshmem.c index 7b19a81..3055dd2 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -706,12 +706,7 @@ static int pci_ivshmem_init(PCIDevice *dev) } pci_conf = s->dev.config; - pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REDHAT_QUMRANET); - pci_conf[0x02] = 0x10; - pci_conf[0x03] = 0x11; pci_conf[PCI_COMMAND] = PCI_COMMAND_IO | PCI_COMMAND_MEMORY; - pci_config_set_class(pci_conf, PCI_CLASS_MEMORY_RAM); - pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; pci_config_set_interrupt_pin(pci_conf, 1); @@ -809,6 +804,9 @@ static PCIDeviceInfo ivshmem_info = { .qdev.reset = ivshmem_reset, .init = pci_ivshmem_init, .exit = pci_ivshmem_uninit, + .vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET, + .device_id = 0x1110, + .class_id = PCI_CLASS_MEMORY_RAM, .qdev.props = (Property[]) { DEFINE_PROP_CHR("chardev", IVShmemState, server_chr), DEFINE_PROP_STRING("size", IVShmemState, sizearg),