From: Isaku Yamahata Date: Tue, 19 Oct 2010 09:06:30 +0000 (+0900) Subject: pci: use pci_word_test_and_clear_mask() in pci_device_reset() X-Git-Tag: qemu-xen-4.2.0~2132^2^2~16 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=99443c21b06aa433d74880f9d2a0e4320631b906;p=qemu-xen.git pci: use pci_word_test_and_clear_mask() in pci_device_reset() use pci_clear_bit_word() in pci_device_reset() where appropriate. Signed-off-by: Isaku Yamahata Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/pci.c b/hw/pci.c index 300079f4af..409e2c079b 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -139,9 +139,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_word_test_and_clear_mask(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) {