Skip to content

Commit

Permalink
Staging: comedi: fix comedi_fc.h checkpatch.pl issues.
Browse files Browse the repository at this point in the history
This resolves all the resolvable checkpatch.pl issues in the
comedi_fc.h file.

Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Jan 6, 2009
1 parent 652dd4e commit 6d62a12
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions drivers/staging/comedi/drivers/comedi_fc.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,30 @@
#include "../comedidev.h"

/* Writes an array of data points to comedi's buffer */
extern unsigned int cfc_write_array_to_buffer(comedi_subdevice * subd,
void *data, unsigned int num_bytes);
extern unsigned int cfc_write_array_to_buffer(comedi_subdevice *subd,
void *data,
unsigned int num_bytes);

static inline unsigned int cfc_write_to_buffer(comedi_subdevice * subd,
sampl_t data)
static inline unsigned int cfc_write_to_buffer(comedi_subdevice *subd,
sampl_t data)
{
return cfc_write_array_to_buffer(subd, &data, sizeof(data));
};

static inline unsigned int cfc_write_long_to_buffer(comedi_subdevice * subd,
lsampl_t data)
static inline unsigned int cfc_write_long_to_buffer(comedi_subdevice *subd,
lsampl_t data)
{
return cfc_write_array_to_buffer(subd, &data, sizeof(data));
};

extern unsigned int cfc_read_array_from_buffer(comedi_subdevice * subd,
void *data, unsigned int num_bytes);
extern unsigned int cfc_read_array_from_buffer(comedi_subdevice *subd,
void *data,
unsigned int num_bytes);

extern unsigned int cfc_handle_events(comedi_device * dev,
comedi_subdevice * subd);
extern unsigned int cfc_handle_events(comedi_device *dev,
comedi_subdevice *subd);

static inline unsigned int cfc_bytes_per_scan(comedi_subdevice * subd)
static inline unsigned int cfc_bytes_per_scan(comedi_subdevice *subd)
{
int num_samples;
int bits_per_sample;
Expand All @@ -61,9 +63,8 @@ static inline unsigned int cfc_bytes_per_scan(comedi_subdevice * subd)
case COMEDI_SUBD_DO:
case COMEDI_SUBD_DIO:
bits_per_sample = 8 * bytes_per_sample(subd);
num_samples =
(subd->async->cmd.chanlist_len + bits_per_sample -
1) / bits_per_sample;
num_samples = (subd->async->cmd.chanlist_len +
bits_per_sample - 1) / bits_per_sample;
break;
default:
num_samples = subd->async->cmd.chanlist_len;
Expand Down

0 comments on commit 6d62a12

Please sign in to comment.