diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-11-19 16:53:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 16:52:25 -0500 |
commit | 6d62a12bb0fde6a70eb18e2ba25e48f6fd5eee07 (patch) | |
tree | 5c4fd52ef141b5ffec78ecbbb2ce253ca12c2c23 | |
parent | 652dd4e7c78a2ad1fcf38c12e8be69651922c690 (diff) |
Staging: comedi: fix comedi_fc.h checkpatch.pl issues.
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>
-rw-r--r-- | drivers/staging/comedi/drivers/comedi_fc.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_fc.h b/drivers/staging/comedi/drivers/comedi_fc.h index b8edd673edfd..6952fe20f273 100644 --- a/drivers/staging/comedi/drivers/comedi_fc.h +++ b/drivers/staging/comedi/drivers/comedi_fc.h | |||
@@ -30,28 +30,30 @@ | |||
30 | #include "../comedidev.h" | 30 | #include "../comedidev.h" |
31 | 31 | ||
32 | /* Writes an array of data points to comedi's buffer */ | 32 | /* Writes an array of data points to comedi's buffer */ |
33 | extern unsigned int cfc_write_array_to_buffer(comedi_subdevice * subd, | 33 | extern unsigned int cfc_write_array_to_buffer(comedi_subdevice *subd, |
34 | void *data, unsigned int num_bytes); | 34 | void *data, |
35 | unsigned int num_bytes); | ||
35 | 36 | ||
36 | static inline unsigned int cfc_write_to_buffer(comedi_subdevice * subd, | 37 | static inline unsigned int cfc_write_to_buffer(comedi_subdevice *subd, |
37 | sampl_t data) | 38 | sampl_t data) |
38 | { | 39 | { |
39 | return cfc_write_array_to_buffer(subd, &data, sizeof(data)); | 40 | return cfc_write_array_to_buffer(subd, &data, sizeof(data)); |
40 | }; | 41 | }; |
41 | 42 | ||
42 | static inline unsigned int cfc_write_long_to_buffer(comedi_subdevice * subd, | 43 | static inline unsigned int cfc_write_long_to_buffer(comedi_subdevice *subd, |
43 | lsampl_t data) | 44 | lsampl_t data) |
44 | { | 45 | { |
45 | return cfc_write_array_to_buffer(subd, &data, sizeof(data)); | 46 | return cfc_write_array_to_buffer(subd, &data, sizeof(data)); |
46 | }; | 47 | }; |
47 | 48 | ||
48 | extern unsigned int cfc_read_array_from_buffer(comedi_subdevice * subd, | 49 | extern unsigned int cfc_read_array_from_buffer(comedi_subdevice *subd, |
49 | void *data, unsigned int num_bytes); | 50 | void *data, |
51 | unsigned int num_bytes); | ||
50 | 52 | ||
51 | extern unsigned int cfc_handle_events(comedi_device * dev, | 53 | extern unsigned int cfc_handle_events(comedi_device *dev, |
52 | comedi_subdevice * subd); | 54 | comedi_subdevice *subd); |
53 | 55 | ||
54 | static inline unsigned int cfc_bytes_per_scan(comedi_subdevice * subd) | 56 | static inline unsigned int cfc_bytes_per_scan(comedi_subdevice *subd) |
55 | { | 57 | { |
56 | int num_samples; | 58 | int num_samples; |
57 | int bits_per_sample; | 59 | int bits_per_sample; |
@@ -61,9 +63,8 @@ static inline unsigned int cfc_bytes_per_scan(comedi_subdevice * subd) | |||
61 | case COMEDI_SUBD_DO: | 63 | case COMEDI_SUBD_DO: |
62 | case COMEDI_SUBD_DIO: | 64 | case COMEDI_SUBD_DIO: |
63 | bits_per_sample = 8 * bytes_per_sample(subd); | 65 | bits_per_sample = 8 * bytes_per_sample(subd); |
64 | num_samples = | 66 | num_samples = (subd->async->cmd.chanlist_len + |
65 | (subd->async->cmd.chanlist_len + bits_per_sample - | 67 | bits_per_sample - 1) / bits_per_sample; |
66 | 1) / bits_per_sample; | ||
67 | break; | 68 | break; |
68 | default: | 69 | default: |
69 | num_samples = subd->async->cmd.chanlist_len; | 70 | num_samples = subd->async->cmd.chanlist_len; |