Lines Matching refs:unit
245 int unit; in pg_init_units() local
248 for (unit = 0; unit < PG_UNITS; unit++) { in pg_init_units()
249 int *parm = *drives[unit]; in pg_init_units()
250 struct pg *dev = &devices[unit]; in pg_init_units()
257 snprintf(dev->name, PG_NAMELEN, "%s%c", name, 'a'+unit); in pg_init_units()
481 int k, unit; in pg_detect() local
503 for (unit = 0; unit < PG_UNITS; unit++, dev++) { in pg_detect()
504 int *parm = *drives[unit]; in pg_detect()
528 int unit = iminor(inode) & 0x7f; in pg_open() local
529 struct pg *dev = &devices[unit]; in pg_open()
533 if ((unit >= PG_UNITS) || (!dev->present)) { in pg_open()
667 int unit; in pg_init() local
685 for (unit = 0; unit < PG_UNITS; unit++) { in pg_init()
686 struct pg *dev = &devices[unit]; in pg_init()
698 for (unit = 0; unit < PG_UNITS; unit++) { in pg_init()
699 struct pg *dev = &devices[unit]; in pg_init()
701 device_create(pg_class, NULL, MKDEV(major, unit), NULL, in pg_init()
702 "pg%u", unit); in pg_init()
715 int unit; in pg_exit() local
717 for (unit = 0; unit < PG_UNITS; unit++) { in pg_exit()
718 struct pg *dev = &devices[unit]; in pg_exit()
720 device_destroy(pg_class, MKDEV(major, unit)); in pg_exit()
725 for (unit = 0; unit < PG_UNITS; unit++) { in pg_exit()
726 struct pg *dev = &devices[unit]; in pg_exit()