Staging: comedi: Replace wrapper function
PATCH 6/7 Staging: comedi: Replace wrapper function
Replace wrapper function "comedi_buf_map_put" reference as part of remove all wrappers in drivers/staging/comedi/TODO, with the wrapped code
Signed-off-by Evan Chime <[email protected]>
--- drivers/staging/comedi/comedi_fops.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/staging/comedi/comedi_fops.c +5 -2
@@ -2272,7 +2272,8 @@ static void comedi_vm_close(struct vm_area_struct *area)struct comedi_buf_map *bm; bm = area->vm_private_data; -comedi_buf_map_put (bm); +if (bm) +kref_put (&bm->refcount, comedi_buf_map_kref_release); } static int comedi_vm_access(struct vm_area_struct *vma, unsigned long addr,
@@ -2395,7 +2396,9 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma) done:up_read (&dev->attach_lock); -comedi_buf_map_put (bm);/* put reference to buf map - okay if NULL */ +if (bm)/* put reference to buf map - okay if NULL */ +kref_put (&bm->refcount, + comedi_buf_map_kref_release);return retval; }
Signature · 1 line
2.17.1