return i;
}
-/*
- * Caller hold the irq_lock
- */
static int map_domain_pirq(struct domain *d, int pirq, int vector,
struct physdev_map_pirq *map)
{
return ret;
}
-/*
- * The pirq should has been unbound before this call
- */
+/* The pirq should have been unbound before this call. */
static int unmap_domain_pirq(struct domain *d, int pirq)
{
int ret = 0;
irq = irq_op.irq;
ret = -EINVAL;
- if ( ((irq < 0) && (irq != AUTO_ASSIGN)) || (irq >= NR_IRQS) )
+ if ( (irq < 0) || (irq >= NR_IRQS) )
break;
irq_op.vector = assign_irq_vector(irq);
if ( msi_enable )
{
spin_lock_irqsave(&dom0->arch.irq_lock, flags);
- if ( irq != AUTO_ASSIGN )
- ret = map_domain_pirq(dom0, irq_op.irq, irq_op.vector, NULL);
+ ret = map_domain_pirq(dom0, irq_op.irq, irq_op.vector, NULL);
spin_unlock_irqrestore(&dom0->arch.irq_lock, flags);
}