aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/addi-data/addi_common.c
Commit message (Collapse)AuthorAgeFilesLines
* more driver stuff from 3.2.72Wolfgang Wiedmeyer2015-10-231-1/+1
|
* staging: comedi: addi-data: Get rid of redundant ps_BoardInfoIan Abbott2011-05-171-4/+2
| | | | | | | | | | The ps_BoardInfo pointer in the device private data is redundant as we can just use the this_board macro to access the same data, as is done elsewhere in the code. Get rid of the pointer and change the code to use the this_board macro instead. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: comedi: addi-data: Don't overwrite read-only dataIan Abbott2011-05-171-18/+37
| | | | | | | | | | | | | | | | | 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>
* Staging: trivial: fix typos concerning "controller"Uwe Kleine-König2010-11-091-2/+2
| | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: update web addresses in stagingJustin P. Mattock2010-09-261-1/+1
| | | | | | | | 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>
* Staging: comedi: Remove COMEDI_PCI_INITCLEANUP macroArun Thomas2010-06-171-1/+37
| | | | | | | | Move the PCI devinit/devexit routines to the respective C source files instead of calling COMEDI_PCI_INITCLEANUP Signed-off-by: Arun Thomas <arun.thomas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: addi-data: don't overwrite name for request_irq()Ian Abbott2010-06-041-5/+1
| | | | | | | | | | | | | | | | The Addi-Data PCI drivers for Comedi use sprintf() in their comedi "attach" routine to construct a string to pass as the name in the call to request_irq(). All calls to "attach" routine share the same static buffer for this name, but the contents will differ on each call (including the comedi device number and the comedi board name). This changes the name displayed in /proc/interrupts for previous calls to request_irq() using the same buffer. Just use the board name instead; it has slightly less information (no comedi device number) but at least it doesn't change over the lifetime of the IRQ handler. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Give the addi_apci_* drivers different driver namesIan Abbott2010-06-041-2/+6
| | | | | | | | | | It is not currently possible for more than one of the addi_apci_* drivers to register themselves with comedi at once because they all use the same comedi driver name "addi_common". Give them different names. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: addi_common.c: sparse cleanupsGreg Kroah-Hartman2010-05-111-7/+6
| | | | | | | | | | | Now that we are properly marking the variable as __iomem, don't cast it. Also fix up some other sparse warnings. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* staging: Fix misspelling of "should" and "shouldn't" in comments.Adam Buchbinder2010-03-031-1/+1
| | | | | | | | 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>
* Staging: comedi: remove some RT code that lingeredGreg Kroah-Hartman2009-06-191-13/+6
| | | | | | | | | This removes some pieces of RT code that was part of the main code paths. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: remove comedi-specific wrappersGreg Kroah-Hartman2009-06-191-7/+7
| | | | | | | | | | | 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>
* Staging: comedi: fix the way structs are initialized.Bill Pemberton2009-06-191-8/+8
| | | | | | | | Change from the foo: bar format to the .foo = bar format. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: remove assignment in conditionalsBill Pemberton2009-06-191-13/+15
| | | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: Comedi: change space indentation to tabsBill Pemberton2009-06-191-8/+8
| | | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging Comedi: fix spacing around parensBill Pemberton2009-06-191-1/+1
| | | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: fix "foo * bar" should be "foo *bar"Bill Pemberton2009-06-191-5/+5
| | | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove C99 commentsBill Pemberton2009-06-191-32/+32
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: comedi, remove interrupt.hJiri Slaby2009-06-191-2/+2
| | | | | | | | | | | | | Remove interrupt wraparound. Use defines from linux/interrupt.h instead. Change also parameter types of functions taking ISR to irq_handler_t. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Cc: David Schleef <ds@schleef.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove addi_private typedef in addi-dataBill Pemberton2009-06-191-2/+2
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove boardtype typedef in addi-dataBill Pemberton2009-06-191-5/+5
| | | | | | | | typedef for boardtype removed and struct renamed to addi_board Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove ULONG_PTR typedef in addi-dataBill Pemberton2009-06-191-1/+1
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove DWORD and *PDWORD typedefs in addi-dataBill Pemberton2009-06-191-1/+1
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove INT and *PINT typedefs in addi-dataBill Pemberton2009-06-191-6/+6
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove WORD and *PWORD typedefs in addi-dataBill Pemberton2009-06-191-2/+2
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove comedi_devconfig typedefBill Pemberton2009-04-031-3/+3
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove comedi_insn typedefBill Pemberton2009-04-031-3/+3
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove comedi_driver typedefBill Pemberton2009-04-031-1/+1
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove comedi_subdevice typedefBill Pemberton2009-04-031-4/+4
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove comedi_device typedefBill Pemberton2009-04-031-13/+13
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: Remove lsampl_t and sampl_t typedefsBill Pemberton2009-04-031-3/+3
| | | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: comedi: add addi-data driversADDI-DATA GmbH2009-04-031-0/+3062
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>