From patchwork Wed Oct 2 12:41:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 279740 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BA34E2C009A for ; Wed, 2 Oct 2013 22:51:59 +1000 (EST) Received: from localhost ([::1]:35926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRLuH-0008Lc-NA for incoming@patchwork.ozlabs.org; Wed, 02 Oct 2013 08:51:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRLkr-0001g6-L4 for qemu-devel@nongnu.org; Wed, 02 Oct 2013 08:42:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRLkl-0008Lv-Kq for qemu-devel@nongnu.org; Wed, 02 Oct 2013 08:42:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRLkl-0008Lm-CK for qemu-devel@nongnu.org; Wed, 02 Oct 2013 08:42:07 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r92Cg2RA026875 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Oct 2013 08:42:02 -0400 Received: from localhost.localdomain.com (vpn-200-122.tlv.redhat.com [10.35.200.122]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r92CfFYx001839; Wed, 2 Oct 2013 08:41:58 -0400 From: Marcel Apfelbaum To: qemu-devel@nongnu.org Date: Wed, 2 Oct 2013 15:41:34 +0300 Message-Id: <1380717694-13091-10-git-send-email-marcel.a@redhat.com> In-Reply-To: <1380717694-13091-1-git-send-email-marcel.a@redhat.com> References: <1380717694-13091-1-git-send-email-marcel.a@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, anthony@codemonkey.ws, mst@redhat.com, sw@weilnetz.de, jasowang@redhat.com, dkoch@verizon.com, keith.busch@intel.com, alex.williamson@redhat.com, kraxel@redhat.com, stefanha@redhat.com, dmitry@daynix.com, pbonzini@redhat.com, afaerber@suse.de, ehabkost@redhat.com Subject: [Qemu-devel] [PATCH RFC v2 9/9] hw/pci: removed irq field from PCIDevice 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 Instead of exposing the the irq field, pci wrappers to qemu_set_irq or qemu_irq_* can be used. Signed-off-by: Marcel Apfelbaum --- hw/pci/pci.c | 2 -- include/hw/pci/pci.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index fbfd8f7..f8d0b81 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -863,14 +863,12 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, pci_dev->config_read = config_read; pci_dev->config_write = config_write; bus->devices[devfn] = pci_dev; - pci_dev->irq = qemu_allocate_irqs(pci_irq_handler, pci_dev, PCI_NUM_PINS); pci_dev->version_id = 2; /* Current pci device vmstate version */ return pci_dev; } static void do_pci_unregister_device(PCIDevice *pci_dev) { - qemu_free_irqs(pci_dev->irq); pci_dev->bus->devices[pci_dev->devfn] = NULL; pci_config_free(pci_dev); diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index df7d316..e9346bd 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -247,9 +247,6 @@ struct PCIDevice { PCIConfigReadFunc *config_read; PCIConfigWriteFunc *config_write; - /* IRQ objects for the INTA-INTD pins. */ - qemu_irq *irq; - /* Legacy PCI VGA regions */ MemoryRegion *vga_regions[QEMU_PCI_VGA_NUM_REGIONS]; bool has_vga;