Lines Matching refs:unit
139 #define DU (*drives[unit])
605 int unit; in pt_detect() local
616 for (unit = 0; unit < PT_UNITS; unit++) { in pt_detect()
617 struct pt_unit *tape = &pt[unit]; in pt_detect()
625 snprintf(tape->name, PT_NAMELEN, "%s%d", name, unit); in pt_detect()
661 int unit = iminor(inode) & 0x7F; in pt_open() local
662 struct pt_unit *tape = pt + unit; in pt_open()
666 if (unit >= PT_UNITS || (!tape->present)) { in pt_open()
964 int unit; in pt_init() local
980 for (unit = 0; unit < PT_UNITS; unit++) in pt_init()
981 if (pt[unit].present) in pt_init()
982 pi_release(pt[unit].pi); in pt_init()
992 for (unit = 0; unit < PT_UNITS; unit++) in pt_init()
993 if (pt[unit].present) { in pt_init()
994 device_create(pt_class, NULL, MKDEV(major, unit), NULL, in pt_init()
995 "pt%d", unit); in pt_init()
996 device_create(pt_class, NULL, MKDEV(major, unit + 128), in pt_init()
997 NULL, "pt%dn", unit); in pt_init()
1009 int unit; in pt_exit() local
1010 for (unit = 0; unit < PT_UNITS; unit++) in pt_exit()
1011 if (pt[unit].present) { in pt_exit()
1012 device_destroy(pt_class, MKDEV(major, unit)); in pt_exit()
1013 device_destroy(pt_class, MKDEV(major, unit + 128)); in pt_exit()
1017 for (unit = 0; unit < PT_UNITS; unit++) in pt_exit()
1018 if (pt[unit].present) in pt_exit()
1019 pi_release(pt[unit].pi); in pt_exit()