Ejemplo n.º 1
0
void reserve_intc_vectors(struct intc_vect *vectors, unsigned int nr_vecs)
{
	int i;

	for (i = 0; i < nr_vecs; i++)
		irq_reserve_irq(evt2irq(vectors[i].vect));
}
Ejemplo n.º 2
0
int irq_set_chip(unsigned int irq, struct irq_chip *chip)
{
    unsigned long flags;
    struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);

    if (!desc)
        return -EINVAL;

    if (!chip)
        chip = &no_irq_chip;

    desc->irq_data.chip = chip;
    irq_put_desc_unlock(desc, flags);
    irq_reserve_irq(irq);
    return 0;
}
/**
 *	irq_set_chip - set the irq chip for an irq
 *	@irq:	irq number
 *	@chip:	pointer to irq chip description structure
 */
int irq_set_chip(unsigned int irq, struct irq_chip *chip)
{
	unsigned long flags;
	struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);

	if (!desc)
		return -EINVAL;

	if (!chip)
		chip = &no_irq_chip;

	desc->irq_data.chip = chip;
	irq_put_desc_unlock(desc, flags);
	/*
	 * For !CONFIG_SPARSE_IRQ make the irq show up in
	 * allocated_irqs. For the CONFIG_SPARSE_IRQ case, it is
	 * already marked, and this call is harmless.
	 */
	irq_reserve_irq(irq);
	return 0;
}