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