Lines Matching refs:cp_inst
266 struct coproc_instance *cp_inst; in coproc_open() local
268 cp_inst = kzalloc(sizeof(*cp_inst), GFP_KERNEL); in coproc_open()
269 if (!cp_inst) in coproc_open()
272 cp_inst->coproc = container_of(inode->i_cdev, struct coproc_dev, in coproc_open()
274 fp->private_data = cp_inst; in coproc_open()
283 struct coproc_instance *cp_inst; in coproc_ioc_tx_win_open() local
287 cp_inst = fp->private_data; in coproc_ioc_tx_win_open()
292 if (cp_inst->txwin) in coproc_ioc_tx_win_open()
306 if (!cp_inst->coproc->vops && !cp_inst->coproc->vops->open_win) { in coproc_ioc_tx_win_open()
311 txwin = cp_inst->coproc->vops->open_win(uattr.vas_id, uattr.flags, in coproc_ioc_tx_win_open()
312 cp_inst->coproc->cop_type); in coproc_ioc_tx_win_open()
319 cp_inst->txwin = txwin; in coproc_ioc_tx_win_open()
326 struct coproc_instance *cp_inst = fp->private_data; in coproc_release() local
329 if (cp_inst->txwin) { in coproc_release()
330 if (cp_inst->coproc->vops && in coproc_release()
331 cp_inst->coproc->vops->close_win) { in coproc_release()
332 rc = cp_inst->coproc->vops->close_win(cp_inst->txwin); in coproc_release()
336 cp_inst->txwin = NULL; in coproc_release()
339 kfree(cp_inst); in coproc_release()
355 struct coproc_instance *cp_inst = fp->private_data; in coproc_mmap() local
362 txwin = cp_inst->txwin; in coproc_mmap()
376 if (!cp_inst->coproc->vops && !cp_inst->coproc->vops->paste_addr) { in coproc_mmap()
381 paste_addr = cp_inst->coproc->vops->paste_addr(txwin); in coproc_mmap()