Lines Matching refs:winch
591 struct winch { struct
603 struct winch *winch = container_of(work, struct winch, work); in __free_winch() argument
604 um_free_irq(WINCH_IRQ, winch); in __free_winch()
606 if (winch->pid != -1) in __free_winch()
607 os_kill_process(winch->pid, 1); in __free_winch()
608 if (winch->stack != 0) in __free_winch()
609 free_stack(winch->stack, 0); in __free_winch()
610 kfree(winch); in __free_winch()
613 static void free_winch(struct winch *winch) in free_winch() argument
615 int fd = winch->fd; in free_winch()
616 winch->fd = -1; in free_winch()
619 __free_winch(&winch->work); in free_winch()
624 struct winch *winch = data; in winch_interrupt() local
627 int fd = winch->fd; in winch_interrupt()
637 winch->fd = -1; in winch_interrupt()
638 list_del(&winch->list); in winch_interrupt()
644 winch->tty_fd); in winch_interrupt()
646 INIT_WORK(&winch->work, __free_winch); in winch_interrupt()
647 schedule_work(&winch->work); in winch_interrupt()
653 tty = tty_port_tty_get(winch->port); in winch_interrupt()
673 struct winch *winch; in register_winch_irq() local
675 winch = kmalloc(sizeof(*winch), GFP_KERNEL); in register_winch_irq()
676 if (winch == NULL) { in register_winch_irq()
681 *winch = ((struct winch) { .fd = fd, in register_winch_irq()
688 list_add(&winch->list, &winch_handlers); in register_winch_irq()
692 IRQF_SHARED, "winch", winch) < 0) { in register_winch_irq()
696 list_del(&winch->list); in register_winch_irq()
704 kfree(winch); in register_winch_irq()
715 struct winch *winch; in unregister_winch() local
721 winch = list_entry(ele, struct winch, list); in unregister_winch()
722 wtty = tty_port_tty_get(winch->port); in unregister_winch()
724 list_del(&winch->list); in unregister_winch()
726 free_winch(winch); in unregister_winch()
736 struct winch *winch; in winch_cleanup() local
739 while ((winch = list_first_entry_or_null(&winch_handlers, in winch_cleanup()
740 struct winch, list))) { in winch_cleanup()
741 list_del(&winch->list); in winch_cleanup()
744 free_winch(winch); in winch_cleanup()