aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
AgeCommit message (Collapse)Author
2009-10-14Staging: comedi: fix sched.h build breakageGreg Kroah-Hartman
commit d43c36dc removed sched.h from interrupt.h. This broke some of the comedi drivers. This patch fixes this. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: fix build on arches that don't want comedi driversGreg Kroah-Hartman
This should fix the problem of comedi drivers showing up on arches that can not support the comedi subsystem (like s390). Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: pcmcia irq fixesFrank Mori Hess
Replaced IRQ_TYPE_EXCLUSIVE with IRQ_TYPE_DYNAMIC_SHARING for pcmcia drivers. Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: ni_pcimio: Added device id for pxi-6225.Frank Mori Hess
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: ni_65xx.c: fix output inversion problem.Ian Abbott
When reading DO subdevice with inverted outputs invert the values read back from the ports to match the inversion of values written. Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: ni_65xx.c: fix insn_bits shift calculation.Ian Abbott
Fix insn_bits bitshift calculation for subdevice with non-zero base_port. Thanks to cJ-comedi at zougloub dot eu for spotting the bug. Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: s526: fixes for pulse generatorIan Abbott
Some changes and corrections to handling of INSN_CONFIG_GPCT_SINGLE_PULSE_GENERATOR, and INSN_CONFIG_GPCT_PULSE_TRAIN_GENERATOR, so they interpret insn->data[] as per the comments in the code. Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: s526: Take account of arch's byte order.Ian Abbott
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: s526: Get rid of global variable 'cmReg'.Ian Abbott
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: s526: Fix number of channels on DIO subdeviceIan Abbott
Correct operation of INSN_CONFIG_DIO_INPUT and INSN_CONFIG_DIO_OUTPUT and support INSN_CONFIG_DIO_QUERY. Thanks to Alessio Margan for some testing. Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: cb_pcidio: fix "section mismatch" errorIan Abbott
Store PCI device IDs in the board info and use this for matching IDs in the code instead of using the module device table. This avoids a "section mismatch" error. Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: jr3_pci: Initialize transf variable fully in ↵Ian Abbott
jr3_pci_poll_subdevice(). Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: Corrected type of a printk argument in resize_async_buffer().Ian Abbott
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-09Staging: comedi: serial2002: fix include build issueGreg Kroah-Hartman
Now that sched.h was removed from poll.h, serial2002.c needs to include it otherwise it does not build properly. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: comedi: addi-data: NULL dereference of amcc in v_pci_card_list_init()Roel Kluin
amcc allocation may fail, prevent a NULL dereference. allocation may fail, prevent a dereference. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: comedi: apci3200: fix test of ui_DelayTime range in ↵Roel Kluin
i_APCI3200_CommandTestAnalogInput() For ui_DelayTime to be less than 1 and greater than 1023 is logically impossible. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: ARRAY_SIZE changesStoyan Gaydarov
These changes were a direct result of using a semantic patch More information can be found at http://www.emn.fr/x-info/coccinelle/ Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: comedi: s626: Possible read buffer overflow fixRoel Kluin
If `cmd->chanlist_len' is 0, then we write ppl[-1]. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: comedi: Remove references to dead EXPORT_SYMTABRobert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: comedi: no need for checking vfree callFigo.zhang
vfree() does it's own NULL checking,so no need for check before calling it. 'pages' is local variable argment,so in v2, it is no need assignment to NULL. Signed-off-by: Figo.zhang <figo1802@gmail.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: Comedi: Lindent changes to comdi driver in staging treeMithlesh Thukral
Lindent changes to comdi driver in staging tree. This patch is followed by the checkpatch.pl error fixes. Did not make them part of this patch as the patch size is already huge. Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-14Networking: use CAP_NET_ADMIN when deciding to call request_moduleEric Paris
The networking code checks CAP_SYS_MODULE before using request_module() to try to load a kernel module. While this seems reasonable it's actually weakening system security since we have to allow CAP_SYS_MODULE for things like /sbin/ip and bluetoothd which need to be able to trigger module loads. CAP_SYS_MODULE actually grants those binaries the ability to directly load any code into the kernel. We should instead be protecting modprobe and the modules on disk, rather than granting random programs the ability to load code directly into the kernel. Instead we are going to gate those networking checks on CAP_NET_ADMIN which still limits them to root but which does not grant those processes the ability to load arbitrary code into the kernel. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Acked-by: Paul Moore <paul.moore@hp.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: James Morris <jmorris@namei.org>
2009-07-12Staging: comedi: s626: use subvendor:subdevice ids for SAA7146 boardHerton Ronaldo Krzesinski
The current s626 comedi driver in staging conflicts with philips SAA7146 media/dvb based cards, because it claims the same vendor:device pci id for all subdevice/subvendor ids. What happens is that for people that have a philips SAA7146 media/dvb based card, s626 if available gets loaded by udev and makes system freeze (https://qa.mandriva.com/show_bug.cgi?id=51445). The s626 driver shouldn't claim all 1131:7146 devices. Fix this by specifying specific known subvendor:subdevice ids in its pci id table list. Also s626_attach is modified to use now pci_get_subsys instead of pci_get_device as reported by Ian Abbott, and now we loop over pci id table entries in case more ids are added in the future. Reference: http://lkml.org/lkml/2009/6/16/552 Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12Staging: comedi: jr3_pci.c: add required includesAlexander Beregalov
Fix this build errors: jr3_pci.c:739: error: 'jiffies' undeclared jr3_pci.c:748: error: implicit declaration of function 'msecs_to_jiffies' jr3_pci.c:763: error: implicit declaration of function 'add_timer' jr3_pci.c:790: error: implicit declaration of function 'init_timer' jr3_pci.c:951: error: implicit declaration of function 'del_timer_sync' Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: fix build errorsGreg Kroah-Hartman
Some of the comedi drivers need timer.h to build properly, so put it in the comedidev.h file to fix these errors. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: fix operator precedence errorsRoel Kluin
`!' has a higher precedence than `&' and `|' has a higher precedence than `?' Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: uses udelay, needs delay.hRandy Dunlap
comedi driver(s) use udelay() so they need to #include delay.h. drivers/staging/comedi/drivers/adq12b.c: In function 'adq12b_ai_rinsn': drivers/staging/comedi/drivers/adq12b.c:328: error: implicit declaration of function 'udelay' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: cb_pcidas.c: Fix build warning (type mismatch)Gerard Lledo
spin_lock_irqsave expects flags to be unsigned long, not unsigned int. Signed-off-by: Gerard Lledo <gerard.lledo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: usbdux: buffer overflow error handlingBernd Porr
These changes guarantee that the URBs are not resubmitted in case of a comedi buffer overflow. Otherwise this runs in the background even when the userspace program has terminated. From: Bernd Porr <BerndPorr@f2s.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19staging: comedi: Move pcm do_cmdtest function into a single source fileBill Pemberton
Many of the comedi source code has functions that were created with cut and paste, this moves the do_cmdtest function into a single file. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19staging: comedi: Remove MIN macroBill Pemberton
Remove the MIN() macro and instead use the min() provided by kernel.h Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19staging: comedi: fix missing parenthesesRoel Kluin
Add missing parentheses. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: data.c should include delay.hAlexander Beregalov
Fix this build error: .../data.c:86: error: implicit declaration of function 'udelay' Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: comedi_test.c should include timer.hAlexander Beregalov
Fix this build error: .../comedi_test.c:82: error: field timer has incomplete type .../comedi_test.c: In function waveform_ai_interrupt: .../comedi_test.c:188: error: implicit declaration of function mod_timer .../comedi_test.c:188: error: jiffies undeclared (first use in this function) Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19staging: comedi: fix pcmcia build breakageGreg Kroah-Hartman
Add PCCARD dependancy to the PCMCIA drivers to fix build breakage. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: Comedi: vmk80xx: Add k8061 supportManuel Gebele
This patch adds support for the Velleman K8061 USB board http://www.velleman.be/ot/en/product/view/?id=364910 Signed-off-by: Manuel Gebele <forensixs@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: simply read and write functions in adl_pci8164Bill Pemberton
There are several read and write functions in adl_pci8164 that are essentially the same thing. They were created with a cut and paste. Change them to use a common function. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: replace for loop with msleep()Bill Pemberton
Replace 2 attempts to use a for loop as a sleep with a call to msleep(). Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: remove some RT code that lingeredGreg Kroah-Hartman
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>
2009-06-19Staging: comedi: remove RT codeGreg Kroah-Hartman
This removes the unused RT code from the comedi subsystem. A lot of drivers needed to then include interrupt.h on their own, as they were picking it up through the comedi_rt.h inclusion. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: remove comedi-specific wrappersGreg Kroah-Hartman
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>
2009-06-19Staging: comedi: convert usbdux* to use firmware_requestBernd Porr
The firmware is now in the linux-firmware tree, so we can move these two drivers to use the proper request_firmware infrastructure. From: Bernd Porr <BerndPorr@f2s.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: move while to same line as } in do loopsBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: comment out useless ifBill Pemberton
This if test doesn't do anything, so comment it out. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: make use of ARRAY_SIZE macroBill Pemberton
Replace instances of computing number of elements in an array with sizeof(foo)/sizeof(struct footype) with the ARRAY_SIZE macro. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: more fix the way structs are initialized.Bill Pemberton
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>
2009-06-19Staging: comedi: more fix "foo * bar" should be "foo *bar"Bill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: remove space after ampersandBill Pemberton
Change calses of & foo to &foo as suggested by checkpatch. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: more remove C99 commentsBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: comedi: fix the way structs are initialized.Bill Pemberton
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>