qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] PCI Using macro definition instead of a simple digit
@ 2012-03-03 12:47 Wanpeng Li
  0 siblings, 0 replies; 3+ messages in thread
From: Wanpeng Li @ 2012-03-03 12:47 UTC (permalink / raw)
  To: qemu-devel, aliguori; +Cc: liwp

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 <liwp@linux.vnet.ibm.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH] PCI Using macro definition instead of a simple digit
@ 2012-03-03 12:38 Wanpeng Li
  2012-03-03 19:48 ` Andreas Färber
  0 siblings, 1 reply; 3+ messages in thread
From: Wanpeng Li @ 2012-03-03 12:38 UTC (permalink / raw)
  To: qemu-devel, aliguori; +Cc: liwp

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 <liwp@linux.vnet.ibm.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-03 19:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-03 12:47 [Qemu-devel] [PATCH] PCI Using macro definition instead of a simple digit Wanpeng Li
  -- strict thread matches above, loose matches on Subject: below --
2012-03-03 12:38 Wanpeng Li
2012-03-03 19:48 ` Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).