Lines Matching refs:inst

117 #define	getsoftc(inst)	((struct pic_softc *)ddi_get_soft_state(statep, (inst)))  argument
174 int inst; in pic_getinfo() local
178 inst = PIC_MINOR_TO_INST(getminor((dev_t)arg)); in pic_getinfo()
182 if ((softc = getsoftc(inst)) == NULL) { in pic_getinfo()
190 *result = (void *)((uintptr_t)inst); in pic_getinfo()
203 int inst; in pic_attach() local
214 inst = ddi_get_instance(dip); in pic_attach()
215 if (inst >= MAX_PIC_INSTANCES) { in pic_attach()
220 (void) sprintf(name, "env-monitor%d", inst); in pic_attach()
221 minor = PIC_INST_TO_MINOR(inst) | PIC_UNIT_TO_MINOR(0); in pic_attach()
226 inst); in pic_attach()
231 if (ddi_soft_state_zalloc(statep, inst) != DDI_SUCCESS) { in pic_attach()
233 "for inst %d\n", inst); in pic_attach()
238 softc = getsoftc(inst); in pic_attach()
262 minor = PIC_INST_TO_MINOR(inst) | PIC_UNIT_TO_MINOR(i); in pic_attach()
267 ddi_driver_name(dip), inst); in pic_attach()
289 ddi_soft_state_free(statep, inst); in pic_attach()
299 int inst; in pic_detach() local
304 inst = ddi_get_instance(dip); in pic_detach()
305 if ((softc = getsoftc(inst)) == NULL) in pic_detach()
311 ddi_soft_state_free(statep, inst); in pic_detach()
327 int inst = PIC_MINOR_TO_INST(getminor(*devp)); in pic_open() local
329 return (getsoftc(inst) == NULL ? ENXIO : 0); in pic_open()
336 int inst = PIC_MINOR_TO_INST(getminor(dev)); in pic_close() local
338 return (getsoftc(inst) == NULL ? ENXIO : 0); in pic_close()
345 int inst; in pic_ioctl() local
351 inst = PIC_MINOR_TO_INST(getminor(dev)); in pic_ioctl()
352 if ((softc = getsoftc(inst)) == NULL) in pic_ioctl()