#include "comedi_fc.h"
+unsigned int cfc_bytes_per_scan(struct comedi_subdevice *s)
+{
+ unsigned int chanlist_len = s->async->cmd.chanlist_len;
+ unsigned int num_samples;
+ unsigned int bits_per_sample;
+
+ switch (s->type) {
+ case COMEDI_SUBD_DI:
+ case COMEDI_SUBD_DO:
+ case COMEDI_SUBD_DIO:
+ bits_per_sample = 8 * bytes_per_sample(s);
+ num_samples = (chanlist_len + bits_per_sample - 1) /
+ bits_per_sample;
+ break;
+ default:
+ num_samples = chanlist_len;
+ break;
+ }
+ return num_samples * bytes_per_sample(s);
+}
+EXPORT_SYMBOL_GPL(cfc_bytes_per_scan);
+
static void increment_scan_progress(struct comedi_subdevice *s,
unsigned int num_bytes)
{
#include "../comedidev.h"
+unsigned int cfc_bytes_per_scan(struct comedi_subdevice *);
+
/* Writes an array of data points to comedi's buffer */
unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *,
void *data, unsigned int num_bytes);
unsigned int cfc_handle_events(struct comedi_device *,
struct comedi_subdevice *);
-static inline unsigned int cfc_bytes_per_scan(struct comedi_subdevice *s)
-{
- unsigned int chanlist_len = s->async->cmd.chanlist_len;
- unsigned int num_samples;
- unsigned int bits_per_sample;
-
- switch (s->type) {
- case COMEDI_SUBD_DI:
- case COMEDI_SUBD_DO:
- case COMEDI_SUBD_DIO:
- bits_per_sample = 8 * bytes_per_sample(s);
- num_samples = (chanlist_len + bits_per_sample - 1) /
- bits_per_sample;
- break;
- default:
- num_samples = chanlist_len;
- break;
- }
- return num_samples * bytes_per_sample(s);
-}
-
/**
* cfc_check_trigger_src() - trivially validate a comedi_cmd trigger source
* @src: pointer to the trigger source to validate