Patchwork [v4,03/15] pci: use pci_clear_bit_word() in pci_device_reset()

login
register
mail settings
Submitter Isaku Yamahata
Date Oct. 18, 2010, 3:17 a.m.
Message ID <3727d2cbd5cfec32a155a0b70de9de0cf5670648.1287371107.git.yamahata@valinux.co.jp>
Download mbox | patch
Permalink /patch/68111/
State New
Headers show

Comments

Isaku Yamahata - Oct. 18, 2010, 3:17 a.m.
use pci_clear_bit_word() in pci_device_reset() where appropriate.

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

Patch

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) {