static void update_6821_interrupts(struct pia6821 *p) { int new_state; /* start with IRQ A */ new_state = 0; if ((p->irq_a1 && IRQ1_ENABLED(p->ctl_a)) || (p->irq_a2 && IRQ2_ENABLED(p->ctl_a))) new_state = 1; if (new_state != p->irq_a_state) { p->irq_a_state = new_state; if (p->intf->irq_a_func) update_shared_irq_handler(p->intf->irq_a_func); } /* then do IRQ B */ new_state = 0; if ((p->irq_b1 && IRQ1_ENABLED(p->ctl_b)) || (p->irq_b2 && IRQ2_ENABLED(p->ctl_b))) new_state = 1; if (new_state != p->irq_b_state) { p->irq_b_state = new_state; if (p->intf->irq_b_func) update_shared_irq_handler(p->intf->irq_b_func); } }
void C6821::update_6821_interrupts() { int new_state; /* start with IRQ A */ new_state = 0; if ((IRQA1 && ControlA & CTRL_IRQ1_ENABLED) || (IRQA2 && ControlA & CTRL_IRQ2_ENABLED)) new_state = 1; if (new_state != IRQAState) { IRQAState = new_state; if (IRQAFunc) update_shared_irq_handler(IRQAFunc); } /* then do IRQ B */ new_state = 0; if ((IRQB1 && ControlB & CTRL_IRQ1_ENABLED) || (IRQB2 && ControlB & CTRL_IRQ2_ENABLED)) new_state = 1; if (new_state != IRQBState) { IRQBState = new_state; if (IRQBFunc) update_shared_irq_handler(IRQBFunc); } }