Lines Matching refs:unit
139 #define DU (*drives[unit])
604 int unit; in pt_detect() local
609 for (unit = 0; unit < PT_UNITS; unit++) { in pt_detect()
610 struct pt_unit *tape = &pt[unit]; in pt_detect()
618 snprintf(tape->name, PT_NAMELEN, "%s%d", name, unit); in pt_detect()
653 int unit = iminor(inode) & 0x7F; in pt_open() local
654 struct pt_unit *tape = pt + unit; in pt_open()
658 if (unit >= PT_UNITS || (!tape->present)) { in pt_open()
956 int unit; in pt_init() local
972 for (unit = 0; unit < PT_UNITS; unit++) in pt_init()
973 if (pt[unit].present) in pt_init()
974 pi_release(pt[unit].pi); in pt_init()
984 for (unit = 0; unit < PT_UNITS; unit++) in pt_init()
985 if (pt[unit].present) { in pt_init()
986 device_create(pt_class, NULL, MKDEV(major, unit), NULL, in pt_init()
987 "pt%d", unit); in pt_init()
988 device_create(pt_class, NULL, MKDEV(major, unit + 128), in pt_init()
989 NULL, "pt%dn", unit); in pt_init()
1001 int unit; in pt_exit() local
1002 for (unit = 0; unit < PT_UNITS; unit++) in pt_exit()
1003 if (pt[unit].present) { in pt_exit()
1004 device_destroy(pt_class, MKDEV(major, unit)); in pt_exit()
1005 device_destroy(pt_class, MKDEV(major, unit + 128)); in pt_exit()
1009 for (unit = 0; unit < PT_UNITS; unit++) in pt_exit()
1010 if (pt[unit].present) in pt_exit()
1011 pi_release(pt[unit].pi); in pt_exit()