From f4f3f7cf27e7ae015672b59ec40c7deabeaf5d2e Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 20 Jun 2014 10:58:28 -0700 Subject: [PATCH] staging: comedi: introduce comedi_buf_n_bytes_ready() Introduce an inline helper to return the number of bytes that are ready to read from the comedi_async buffer. Use the helper in the comedi drivers that currently do the calculation as part of the (*poll) operation. Also, use the helper in comedi_fops where the calculation is used as part of the subdevice going nonbusy. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed