qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v4 03/15] pci: use pci_clear_bit_word() in pci_devic


From: Isaku Yamahata
Subject: [Qemu-devel] [PATCH v4 03/15] pci: use pci_clear_bit_word() in pci_device_reset()
Date: Mon, 18 Oct 2010 12:17:44 +0900

use pci_clear_bit_word() in pci_device_reset() where appropriate.

Signed-off-by: Isaku Yamahata <address@hidden>
---
 hw/pci.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/pci.c b/hw/pci.c
index e3462a9..5954476 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -137,9 +137,8 @@ static void pci_device_reset(PCIDevice *dev)
     dev->irq_state = 0;
     pci_update_irq_status(dev);
     /* Clear all writeable bits */
-    pci_set_word(dev->config + PCI_COMMAND,
-                 pci_get_word(dev->config + PCI_COMMAND) &
-                 ~pci_get_word(dev->wmask + PCI_COMMAND));
+    pci_clear_bit_word(dev->config + PCI_COMMAND,
+                       pci_get_word(dev->wmask + PCI_COMMAND));
     dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
     dev->config[PCI_INTERRUPT_LINE] = 0x0;
     for (r = 0; r < PCI_NUM_REGIONS; ++r) {
-- 
1.7.1.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]