From patchwork Wed May 25 01:58:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 97267 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 157B0B6F94 for ; Wed, 25 May 2011 12:04:55 +1000 (EST) Received: from localhost ([::1]:52545 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QP3Su-0005f5-A0 for incoming@patchwork.ozlabs.org; Tue, 24 May 2011 22:04:52 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QP3N3-0003Py-BL for qemu-devel@nongnu.org; Tue, 24 May 2011 21:58:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QP3My-0008UN-Qv for qemu-devel@nongnu.org; Tue, 24 May 2011 21:58:49 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:32915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QP3My-0008St-Gq for qemu-devel@nongnu.org; Tue, 24 May 2011 21:58:44 -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 324CA280E1; Wed, 25 May 2011 10:58:39 +0900 (JST) Received: (nullmailer pid 21017 invoked by uid 1000); Wed, 25 May 2011 01:58:36 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org Date: Wed, 25 May 2011 10:58:14 +0900 Message-Id: <0db535c3463dee03b90cf5579fdf8c4a0dcc4688.1306288410.git.yamahata@valinux.co.jp> 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 v3 17/39] hw/ide/ich.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/ide/ich.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/ide/ich.c b/hw/ide/ich.c index e44339b..cb1c405 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -77,11 +77,6 @@ static int pci_ich9_ahci_init(PCIDevice *dev) struct AHCIPCIState *d; d = DO_UPCAST(struct AHCIPCIState, card, dev); - pci_config_set_vendor_id(d->card.config, PCI_VENDOR_ID_INTEL); - pci_config_set_device_id(d->card.config, PCI_DEVICE_ID_INTEL_82801IR); - - pci_config_set_class(d->card.config, PCI_CLASS_STORAGE_SATA); - pci_config_set_revision(d->card.config, 0x02); pci_config_set_prog_interface(d->card.config, AHCI_PROGMODE_MAJOR_REV_1); d->card.config[PCI_CACHE_LINE_SIZE] = 0x08; /* Cache line size */ @@ -131,6 +126,10 @@ static PCIDeviceInfo ich_ahci_info[] = { .init = pci_ich9_ahci_init, .exit = pci_ich9_uninit, .config_write = pci_ich9_write_config, + .vendor_id = PCI_VENDOR_ID_INTEL, + .device_id = PCI_DEVICE_ID_INTEL_82801IR, + .revision = 0x02, + .class_id = PCI_CLASS_STORAGE_SATA, },{ /* end of list */ }