From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3oNv-0006Qk-35 for qemu-devel@nongnu.org; Sat, 03 Mar 2012 07:48:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3oNt-00038r-Bw for qemu-devel@nongnu.org; Sat, 03 Mar 2012 07:48:26 -0500 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:37202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3oNs-00038l-Qf for qemu-devel@nongnu.org; Sat, 03 Mar 2012 07:48:25 -0500 Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 3 Mar 2012 12:45:45 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q23CgSgV3346626 for ; Sat, 3 Mar 2012 23:42:30 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q23Cm03m020138 for ; Sat, 3 Mar 2012 23:48:00 +1100 From: Wanpeng Li Date: Sat, 3 Mar 2012 20:47:58 +0800 Message-Id: <1330778878-32343-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