Patchwork [4/6] pci-assign: Use pci_intx_route_changed()

login
register
mail settings
Submitter Alex Williamson
Date Oct. 2, 2012, 7:22 p.m.
Message ID <20121002192200.31100.84009.stgit@bling.home>
Download mbox | patch
Permalink /patch/188641/
State New
Headers show

Comments

Alex Williamson - Oct. 2, 2012, 7:22 p.m.
Replace open coded version

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---

 hw/kvm/pci-assign.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c
index 7ce0f37..ddde573 100644
--- a/hw/kvm/pci-assign.c
+++ b/hw/kvm/pci-assign.c
@@ -894,8 +894,7 @@  static int assign_intx(AssignedDevice *dev)
         return -ENOTSUP;
     }
 
-    if (dev->intx_route.mode == intx_route.mode &&
-        dev->intx_route.irq == intx_route.irq) {
+    if (!pci_intx_route_changed(&dev->intx_route, &intx_route)) {
         return 0;
     }