Lines Matching refs:urf
398 struct urfile *urf; in urfile_alloc() local
400 urf = kzalloc(sizeof(struct urfile), GFP_KERNEL); in urfile_alloc()
401 if (!urf) in urfile_alloc()
403 urf->urd = urd; in urfile_alloc()
405 TRACE("urfile_alloc: urd=%p urf=%p rl=%zu\n", urd, urf, in urfile_alloc()
406 urf->dev_reclen); in urfile_alloc()
408 return urf; in urfile_alloc()
411 static void urfile_free(struct urfile *urf) in urfile_free() argument
413 TRACE("urfile_free: urf=%p urd=%p\n", urf, urf->urd); in urfile_free()
414 kfree(urf); in urfile_free()
449 struct urfile *urf = file->private_data; in ur_write() local
456 if (count % urf->dev_reclen) in ur_write()
459 if (count > urf->dev_reclen * MAX_RECS_PER_IO) in ur_write()
460 count = urf->dev_reclen * MAX_RECS_PER_IO; in ur_write()
462 return do_write(urf->urd, udata, count, urf->dev_reclen, ppos); in ur_write()
700 struct urfile *urf; in ur_open() local
749 urf = urfile_alloc(urd); in ur_open()
750 if (!urf) { in ur_open()
755 urf->dev_reclen = urd->reclen; in ur_open()
759 urf->file_reclen = rc; in ur_open()
760 file->private_data = urf; in ur_open()
764 urfile_free(urf); in ur_open()
777 struct urfile *urf = file->private_data; in ur_release() local
780 spin_lock(&urf->urd->open_lock); in ur_release()
781 urf->urd->open_flag--; in ur_release()
782 spin_unlock(&urf->urd->open_lock); in ur_release()
783 wake_up_interruptible(&urf->urd->wait); in ur_release()
784 urdev_put(urf->urd); in ur_release()
785 urfile_free(urf); in ur_release()