From patchwork Wed May 25 01:58:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 97281 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 94A4FB6F94 for ; Wed, 25 May 2011 12:10:32 +1000 (EST) Received: from localhost ([::1]:57356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QP3YL-0007hh-J3 for incoming@patchwork.ozlabs.org; Tue, 24 May 2011 22:10:29 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QP3N5-0003Tl-Ip for qemu-devel@nongnu.org; Tue, 24 May 2011 21:58:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QP3N0-00005W-8q for qemu-devel@nongnu.org; Tue, 24 May 2011 21:58:51 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:32905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QP3Mz-0008S3-S7 for qemu-devel@nongnu.org; Tue, 24 May 2011 21:58:46 -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 3BC76280DD; Wed, 25 May 2011 10:58:45 +0900 (JST) Received: (nullmailer pid 21048 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:29 +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 v3 32/39] hw/usb-ohci.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/usb-ohci.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index d21c820..7ff2322 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -1716,11 +1716,7 @@ static int usb_ohci_initfn_pci(struct PCIDevice *dev) OHCIPCIState *ohci = DO_UPCAST(OHCIPCIState, pci_dev, dev); int num_ports = 3; - pci_config_set_vendor_id(ohci->pci_dev.config, PCI_VENDOR_ID_APPLE); - pci_config_set_device_id(ohci->pci_dev.config, - PCI_DEVICE_ID_APPLE_IPID_USB); ohci->pci_dev.config[PCI_CLASS_PROG] = 0x10; /* OHCI */ - pci_config_set_class(ohci->pci_dev.config, PCI_CLASS_SERIAL_USB); /* TODO: RST# value should be 0. */ ohci->pci_dev.config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin 1 */ @@ -1760,6 +1756,9 @@ static PCIDeviceInfo ohci_pci_info = { .qdev.desc = "Apple USB Controller", .qdev.size = sizeof(OHCIPCIState), .init = usb_ohci_initfn_pci, + .vendor_id = PCI_VENDOR_ID_APPLE, + .device_id = PCI_DEVICE_ID_APPLE_IPID_USB, + .class_id = PCI_CLASS_SERIAL_USB, }; static SysBusDeviceInfo ohci_sysbus_info = {