Lines Matching full:magic
41 // different magic number.
65 int magic; member
74 int magic; member
80 int magic; member
160 if (wp->magic == WRITEPORT_MAGIC_X) in port_create()
178 wp->magic = WRITEPORT_MAGIC_W; in port_create()
210 rp->magic = READPORT_MAGIC; in port_open()
287 pg->magic = PORTGROUP_MAGIC; in port_group()
296 if ((rp->magic != READPORT_MAGIC) || rp->gport) { in port_group()
326 if (pg->magic != PORTGROUP_MAGIC) in port_group_add()
330 if (rp->magic != READPORT_MAGIC || rp->gport) in port_group_add()
361 if (pg->magic != PORTGROUP_MAGIC) in port_group_remove()
365 if (rp->magic != READPORT_MAGIC || rp->gport != pg) in port_group_remove()
395 if (wp->magic != WRITEPORT_MAGIC_W) { in port_write()
468 if (rp->magic == READPORT_MAGIC) { in port_read()
471 } else if (rp->magic == PORTGROUP_MAGIC) { in port_read()
504 if (wp->magic != WRITEPORT_MAGIC_X) { in port_destroy()
529 wp->magic = 0; in port_destroy()
546 if (rp->magic == READPORT_MAGIC) { in port_close()
564 rp->magic = 0; in port_close()
566 } else if (rp->magic == PORTGROUP_MAGIC) { in port_close()
576 pg->magic = 0; in port_close()
578 } else if (rp->magic == WRITEPORT_MAGIC_W) { in port_close()
582 wp->magic = WRITEPORT_MAGIC_X; in port_close()