Merge branch 'linus' into core/generic-dma-coherent
[pandora-kernel.git] / arch / powerpc / sysdev / mpic_pasemi_msi.c
index d6bfda3..68aff60 100644 (file)
@@ -95,7 +95,7 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
        unsigned int virq;
        struct msi_desc *entry;
        struct msi_msg msg;
-       u64 addr;
+       int ret;
 
        pr_debug("pasemi_msi_setup_msi_irqs, pdev %p nvec %d type %d\n",
                 pdev, nvec, type);
@@ -109,8 +109,9 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
                 * few MSIs for someone, but restrictions will apply to how the
                 * sources can be changed independently.
                 */
-               hwirq = mpic_msi_alloc_hwirqs(msi_mpic, ALLOC_CHUNK);
-               if (hwirq < 0) {
+               ret = mpic_msi_alloc_hwirqs(msi_mpic, ALLOC_CHUNK);
+               hwirq = ret;
+               if (ret < 0) {
                        pr_debug("pasemi_msi: failed allocating hwirq\n");
                        return hwirq;
                }
@@ -132,8 +133,8 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
                set_irq_chip(virq, &mpic_pasemi_msi_chip);
                set_irq_type(virq, IRQ_TYPE_EDGE_RISING);
 
-               pr_debug("pasemi_msi: allocated virq 0x%x (hw 0x%lx) addr 0x%lx\n",
-                         virq, hwirq, addr);
+               pr_debug("pasemi_msi: allocated virq 0x%x (hw 0x%lx) addr 0x%x\n",
+                         virq, hwirq, msg.address_lo);
 
                /* Likewise, the device writes [0...511] into the target
                 * register to generate MSI [512...1023]