Skip to contentSkip to conversation

Staging: comedi: Remove wrapper function definition

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

lore
Share & tools
lore

Evan Chime

author
#0 lore raw

PATCH 7/7 Staging: comedi: Remove wrapper function definition

Remove wrapper function "comedi_buf_read_n_allocated" definition as part of "remove all wrappers" in drivers/staging/comedi/TODO, and replace reference of the wrapper function in the file with the wrapped code

---
 drivers/staging/comedi/comedi_buf.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/staging/comedi/comedi_buf.c +1 -6
index 470eecead7d4..ef908a258ac7 100644
@@ -502,11 +502,6 @@ unsigned int comedi_buf_read_alloc(struct comedi_subdevice *s,
 }
 EXPORT_SYMBOL_GPL(comedi_buf_read_alloc);
 
-static unsigned int comedi_buf_read_n_allocated(struct comedi_async *async)
-{
-	return async->buf_read_alloc_count - async->buf_read_count;
-}
-
 /**
  * comedi_buf_read_free() - Free buffer space after it has been read
  * @s: COMEDI subdevice.
@@ -532,7 +527,7 @@ unsigned int comedi_buf_read_free(struct comedi_subdevice *s,
 	 */
 	smp_mb();
 
-	allocated = comedi_buf_read_n_allocated(async);
+	allocated = async->buf_read_alloc_count - async->buf_read_count;
 	if (nbytes > allocated)
 		nbytes = allocated;
 
Signature · 1 line
2.17.1