Skip to contentSkip to conversation

Staging: comedi: Replace wrapper function

PATCH In review Evan Chime 1 participant 1 message Oct 23, 2019 Staging

lore
Share & tools
lore

Evan Chime

author
#0 lore raw

PATCH 3/7 Staging: comedi: Replace wrapper function

Replace wrapper function "comedi_buf_map_get" reference as part of remove all wrappers in drivers/staging/comedi/TODO, with the wrapped code

---
 drivers/staging/comedi/comedi_fops.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/comedi/comedi_fops.c +2 -1
index 08d1bbbebf2d..96756d8f2459 100644
@@ -2263,7 +2263,8 @@ static void comedi_vm_open(struct vm_area_struct *area)
 	struct comedi_buf_map *bm;
 
 	bm = area->vm_private_data;
-	comedi_buf_map_get(bm);
+	if (bm)
+		kref_get(&bm->refcount);
 }
 
 static void comedi_vm_close(struct vm_area_struct *area)
Signature · 1 line
2.17.1