History log of /drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
Revision Date Author Comments
57517878df4e5769885e80aba895f4e69b1ddbe9 16-May-2011 Ian Abbott <abbotti@mev.co.uk> staging: comedi: addi-data: Don't overwrite read-only data

The drivers for ADDI-DATA cards can override some static parameters for
the board type using information read from EEPROM. Unfortunately, they
currently write the parameters from the EEPROM back to the shared,
read-only board data! The problem has been masked during compilation by
type-casting away the const-ness of the data.

This patch changes the code to use an area in the private data for the
board instance to hold the parameters read from EEPROM (after
initializing the parameters from the static board data). It also
changes the type-casts to the read-only data to preserve the const
qualifier.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
25417922694e60f04cd4dc8448ada9236f18c532 25-Sep-2010 Justin P. Mattock <justinmattock@gmail.com> staging: update web addresses in staging

The below patch, is a simple fix to a broken web address not using a period in it's
name.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
f69b0d6451679f1466381a46ac7ab671a7b5668c 12-Jul-2010 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Staging: fix typos concerning "address"

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dd105f08c0e9d4081629f96b09abadc0bb51e0d8 26-Feb-2010 Andrea Gelmini <andrea.gelmini@gelma.net> Staging: comedi: hwdrv_apci3120.c: Checkpatch cleanup

ERROR: do not initialise statics to 0 or NULL
+static unsigned int ui_Temp = 0;

WARNING: braces {} are not necessary for any arm of this statement
+ if (data[1]) {
[...]
+ } else
[...]

WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) {
+ devpriv->ui_AiChannelList[i] = data[4 + i];
+ }

ERROR: that open brace { should be on the previous line
+ } else /* EOC */
+ {

WARNING: braces {} are not necessary for any arm of this statement
+ if (data[1]) {
[...]
+ } else {
[...]

ERROR: that open brace { should be on the previous line
+ if (insn->unused[0] == 222) /* second insn read */
+ {

WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < insn->n; i++) {
+ data[i] = devpriv->ui_AiReadData[i];
+ }

WARNING: braces {} are not necessary for single statement blocks
+ if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT) {
+ err++;
+ }

ERROR: that open brace { should be on the previous line
+ if (cmd->scan_begin_src == TRIG_TIMER) /* Test Delay timing */
+ {

ERROR: that open brace { should be on the previous line
+ if (cmd->convert_src == TRIG_TIMER) /* Test Acquisition timing */
+ {

WARNING: braces {} are not necessary for any arm of this statement
+ if (cmd->stop_src == TRIG_COUNT) {
[...]
+ } else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->b_ExttrigEnable == APCI3120_ENABLE) {
+ i_APCI3120_ExttrigEnable(dev); /* activate EXT trigger */
+ }

WARNING: braces {} are not necessary for single statement blocks
+ if (dmalen0 > (devpriv->ui_AiDataLength)) {
+ dmalen0 = devpriv->ui_AiDataLength;
+ }

WARNING: braces {} are not necessary for single statement blocks
+ if (dmalen1 > (devpriv->ui_AiDataLength)) {
+ dmalen1 = devpriv->ui_AiDataLength;
+ }

WARNING: braces {} are not necessary for any arm of this statement
+ if (CR_RANGE(chanlist[i]) < APCI3120_BIPOLAR_RANGES) {
[...]
+ } else {
[...]

ERROR: that open brace { should be on the previous line
+ if (devpriv->b_EocEosInterrupt == APCI3120_ENABLE) /* enable this in without DMA ??? */
+ {

ERROR: that open brace { should be on the previous line
+ if (data[0] == APCI3120_TIMER) /* initialize timer */
+ {

ERROR: that open brace { should be on the previous line
+ } else /* Initialize Watch dog */
+ {

ERROR: that open brace { should be on the previous line
+ if (data[0] == 2) /* write new value */
+ {

ERROR: that open brace { should be on the previous line
+ if (devpriv->b_Timer2Mode == APCI3120_TIMER) /* start timer */
+ {

ERROR: that open brace { should be on the previous line
+ } else /* start watch dog */
+ {

ERROR: that open brace { should be on the previous line
+ if (devpriv->b_Timer2Mode == APCI3120_TIMER) /* start timer */
+ {

ERROR: that open brace { should be on the previous line
+ } else /* Read watch dog status */
+ {

WARNING: braces {} are not necessary for single statement blocks
+ if (!devpriv->b_OutputMemoryStatus) {
+ ui_Temp = 0;
+
+ } /* if(!devpriv->b_OutputMemoryStatus ) */

ERROR: code indent should use tabs where possible
+ data[0] Value to be written$

ERROR: code indent should use tabs where possible
+ data[1] :1 Set digital o/p ON$

ERROR: code indent should use tabs where possible
+ data[1] 2 Set digital o/p OFF with memory ON$

ERROR: that open brace { should be on the previous line
+ if (ui_Range) /* if 1 then unipolar */
+ {

ERROR: that open brace { should be on the previous line
+ } else /* if 0 then bipolar */
+ {

ERROR: that open brace { should be on the previous line
+ do /* Waiting of DA_READY BIT */
+ {

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
39cfb97b0d89a99c8e50782b17e65114b89c2e59 18-Dec-2009 Adam Buchbinder <adam.buchbinder@gmail.com> staging: Fix misspelling of "should" and "shouldn't" in comments.

Some comments misspell "should" or "shouldn't"; this fixes them. No code changes.

Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bbc9a9916bc1cd997f3bf303e7930d5f3c804d37 14-Nov-2009 André Goddard Rosa <andre.goddard@gmail.com> Staging: fix assorted typos all over the place

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dc8af06898c4326cee1739e2bc100bed2b601721 23-Oct-2009 Roel Kluin <roel.kluin@gmail.com> Staging: comedi: addi-data: Cleanup redundant tests on unsigned

The variables are unsigned so the test `>= 0' is always true,
In these cases the other part of the test catch wrapped values.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
5f74ea14c07fee91d3bdbaad88bff6264c6200e6 27-Apr-2009 Greg Kroah-Hartman <gregkh@suse.de> Staging: comedi: remove comedi-specific wrappers

There are a number of comedi "wrappers" for some RT functions that are
about to go away. This patch removes all of the wrapper calls within
the comedi drivers and core in order to prepare for removing the RT
comedi code.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ff89514f8d46f470ffafeda129138ce73efd4c60 23-Apr-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: move while to same line as } in do loops

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
dae0dc30be7fa21b15a9d9534589286c6c3e68a3 23-Apr-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove parens around return values

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
356cdbcb838ebcc234a43ec81621a39231fdcb7a 09-Apr-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: Comedi: change space indentation to tabs

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
da91b2692e0939b307f9047192d2b9fe07793e7a 09-Apr-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: fix "foo * bar" should be "foo *bar"

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1efd18f0cca7251a283625e07dbb4ec8e95a4b6b 27-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: remove C99 comments in hwdrv_apci3120.c

This replaces C99 comments with traditional C comments. This
also removes 3 blocks of code that were already commented out.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
117102b0f6e0a9ab3ea4fa9fd89b7eb4a8888fb9 25-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove UINT and *PUINT typedefs in addi-data

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
74b894e56abcb2403894b268100773f4aabe1999 25-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove INT and *PINT typedefs in addi-data

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
babf0ede302697486a6633e72d051bbb8e31e2b2 25-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove WORD and *PWORD typedefs in addi-data

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
a9fce7c9a3b796334916b216a618fd7586f10d76 25-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove USHORT and *PUSHORT typedefs in addi-data

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1783fbfe023b7c2b912fbb020e01ff46985aa0ab 25-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove BYTE and *PBYTE typedefs in addi-data

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
90035c0886b256d75bced13b3b3cea5234aff136 17-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove comedi_insn typedef

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ea6d0d4cab4f4f2d6a88f3bce4707fe92696fd3f 17-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove comedi_cmd typedef

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
d163679ceec20c50f9aee880fa76c0c1185244a8 17-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove comedi_async typedef

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
34c43922e62708d45e9660eee4b4f1fb7b4bf2c7 17-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove comedi_subdevice typedef

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
71b5f4f11971dea972832ad63a994c7e5b45db6b 17-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove comedi_device typedef

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
790c55415aa31f4c732729f94d2c3a54f7d3bfc2 17-Mar-2009 Bill Pemberton <wfp5p@virginia.edu> Staging: comedi: Remove lsampl_t and sampl_t typedefs

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
c995fe9475e062bab6f5a45ed28cd2d3d955ef43 13-Feb-2009 ADDI-DATA GmbH <info@addi-data.com> Staging: comedi: add addi-data drivers

This adds the addi-data family of comedi drivers to the staging tree

From: ADDI-DATA GmbH <info@addi-data.com>
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>