From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3oEo-0005lU-CG for qemu-devel@nongnu.org; Sat, 03 Mar 2012 07:39:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3oEm-0001EO-ET for qemu-devel@nongnu.org; Sat, 03 Mar 2012 07:39:01 -0500 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:56630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3oEl-0001AZ-Qp for qemu-devel@nongnu.org; Sat, 03 Mar 2012 07:39:00 -0500 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 3 Mar 2012 18:08:48 +0530 Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q23CckrW4309090 for ; Sat, 3 Mar 2012 18:08:46 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q23CcjIG015799 for ; Sat, 3 Mar 2012 23:38:45 +1100 From: Wanpeng Li Date: Sat, 3 Mar 2012 20:38:42 +0800 Message-Id: <1330778322-30749-1-git-send-email-liwp@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH] PCI Using macro definition instead of a simple digit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, aliguori@us.ibm.com Cc: liwp@linux.vnet.ibm.com PCI_CLASS_DISPLAY_VGA has already defined in hw/pci_ids.h, so use the macro definition instead of a simple digit. Signed-off-by: Wanpeng Li --- hw/pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index fe71666..274d86d 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1784,7 +1784,7 @@ static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom) * for 0.11 compatibility. */ int class = pci_get_word(pdev->config + PCI_CLASS_DEVICE); - if (class == 0x0300) { + if (class == PCI_CLASS_DISPLAY_VGA) { rom_add_vga(pdev->romfile); } else { rom_add_option(pdev->romfile, -1); -- 1.7.5.4