Lines Matching refs:magic
51 int magic; member
60 int magic; member
66 int magic; member
141 if (wp->magic == WRITEPORT_MAGIC_X) in port_create()
159 wp->magic = WRITEPORT_MAGIC_W; in port_create()
189 rp->magic = READPORT_MAGIC; in port_open()
265 pg->magic = PORTGROUP_MAGIC; in port_group()
274 if ((rp->magic != READPORT_MAGIC) || rp->gport) { in port_group()
303 if (pg->magic != PORTGROUP_MAGIC) in port_group_add()
307 if (rp->magic != READPORT_MAGIC || rp->gport) in port_group_add()
337 if (pg->magic != PORTGROUP_MAGIC) in port_group_remove()
341 if (rp->magic != READPORT_MAGIC || rp->gport != pg) in port_group_remove()
370 if (wp->magic != WRITEPORT_MAGIC_W) { in port_write()
441 if (rp->magic == READPORT_MAGIC) { in port_read()
444 } else if (rp->magic == PORTGROUP_MAGIC) { in port_read()
476 if (wp->magic != WRITEPORT_MAGIC_X) { in port_destroy()
501 wp->magic = 0; in port_destroy()
517 if (rp->magic == READPORT_MAGIC) { in port_close()
535 rp->magic = 0; in port_close()
537 } else if (rp->magic == PORTGROUP_MAGIC) { in port_close()
547 pg->magic = 0; in port_close()
549 } else if (rp->magic == WRITEPORT_MAGIC_W) { in port_close()
553 wp->magic = WRITEPORT_MAGIC_X; in port_close()