aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-09-03staging: comedi das08_cs.c: Fix io_req_t conversionAndreas Bombe1-1/+0
Commit 90abdc3b9 converted all PCMCIA users away from io_req_t. In das08_cs.c the converted IO lines mask setting was added but the old line using the now inexistent p_dev->io was not removed. Signed-off-by: Andreas Bombe <aeb@debian.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-06Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6Linus Torvalds7-265/+114
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: pcmcia: avoid buffer overflow in pcmcia_setup_isa_irq pcmcia: do not request windows if you don't need to pcmcia: insert PCMCIA device resources into resource tree pcmcia: export resource information to sysfs pcmcia: use struct resource for PCMCIA devices, part 2 pcmcia: remove memreq_t pcmcia: move local definitions out of include/pcmcia/cs.h pcmcia: do not use io_req_t when calling pcmcia_request_io() pcmcia: do not use io_req_t after call to pcmcia_request_io() pcmcia: use struct resource for PCMCIA devices pcmcia: clean up cs.h pcmcia: use pcmica_{read,write}_config_byte pcmcia: remove cs_types.h pcmcia: remove unused flag, simplify headers pcmcia: remove obsolete CS_EVENT_ definitions pcmcia: split up central event handler pcmcia: simplify event callback pcmcia: remove obsolete ioctl Conflicts in: - drivers/staging/comedi/drivers/* - drivers/staging/wlags49_h2/wl_cs.c due to dev_info_t and whitespace changes
2010-08-05Staging: Merge staging-next into Linus's treeGreg Kroah-Hartman127-1352/+3983
Conflicts: drivers/staging/Kconfig drivers/staging/batman-adv/bat_sysfs.c drivers/staging/batman-adv/device.c drivers/staging/batman-adv/hard-interface.c drivers/staging/cx25821/cx25821-audups11.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-03pcmcia: do not request windows if you don't need toDominik Brodowski3-68/+3
Several drivers contained dummy code to request for memory windows, even though they never made use of it. Remove all such code snippets. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-08-03pcmcia: remove memreq_tDominik Brodowski3-12/+6
Page already had to be set to 0; Offset can easily be passed as parameter to pcmcia_map_mem_page. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: linux-bluetooth@vger.kernel.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Michael Buesch <mb@bu3sch.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-08-03pcmcia: do not use io_req_t when calling pcmcia_request_io()Dominik Brodowski7-84/+72
Instead of io_req_t, drivers are now requested to fill out struct pcmcia_device *p_dev->resource[0,1] for up to two ioport ranges. After a call to pcmcia_request_io(), the ports found there are reserved, after calling pcmcia_request_configuration(), they may be used. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Michael Buesch <mb@bu3sch.de> Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-08-03pcmcia: do not use io_req_t after call to pcmcia_request_io()Dominik Brodowski7-43/+31
After pcmcia_request_io(), do not make use of the values stored in io_req_t, but instead use those found in struct pcmcia_device->resource[]. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-07-30pcmcia: remove cs_types.hDominik Brodowski7-7/+0
Remove cs_types.h which is no longer needed: Most definitions aren't used at all, a few can be made away with, and two remaining definitions (typedefs, unfortunatley) may be moved to more specific places. CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-07-22Staging: fix typos concerning "address"Uwe Kleine-König5-8/+8
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22staging: comedi: formatting of pointers in printk()Kulikov Vasiliy1-1/+1
Use %p instead of %08x in printk(). Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22Staging: comedi: Cleanup style issues in adl_pci9111.cMark1-25/+35
This patch fixes some coding style issues in adl_pci9111.c from checkpatch.pl Signed-off-by: Mark Rankilor <reodge@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08Staging: comedi: pcm3724: remove casts from void*Kulikov Vasiliy1-1/+1
Remove unnesessary casts from void*. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08Staging: comedi: use for_each_pci_dev()Kulikov Vasiliy22-92/+43
Use for_each_pci_dev() to simplify the code. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08Staging: comedi: Cleanup on dmm32at.c from checkpatch.plMark1-20/+25
This patch cleans up some style issues in dmm32at.c as found by checkpatch.pl Signed-off-by: Mark Rankilor <reodge@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08Staging: comedi: Cleanup adv_pci1710.c from checkpatch.plMark1-19/+28
This patch cleans up some issues discovered by checkpatch.pl Signed-off-by: Mark Rankilor <reodge@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08Staging: comedi: kcomedilib: fix coding style issues in kcomedilib_main.cGustavo Silva1-2/+2
This is a patch to the kcomedilib_main.c file that fixes up some printk() warning issues. Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08Staging: comedi: fix over 80 character coding style issue in ni_labpc.cMaurice Dawson1-8/+30
This is a patch to the ni_labpc.c file that fixes up 80 character warnings found by the checkpatch.pl tool Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30Staging: comedi: fix read past end of array in cb_pcidda_attach()Dan Carpenter1-2/+1
There are only 6 elements in the cb_pcidda_boards[] array so the original code read past the end. After this change nothing uses N_BOARDS so I removed the definition. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30Staging: comedi: drivers: adl_pci9111: Fix AI commands in TRIG_FOLLOW caseIan Abbott1-3/+6
I received a report that AI streaming acquisitions do not work properly for the adl_pci9111 driver when convert_src is TRIG_TIMER and scan_begin_src is TRIG_FOLLOW (and scan_begin_arg is therefore 0). This seems to be down to the incorrect setting of dev_private->scan_delay in pci9111_ai_do_cmd(). Under the previously stated conditions, dev_private->scan_delay ends up set to (unsigned int)-1, but it ought to be set to 0. The function sets it to 0 initially, and it only makes sense to change it if both convert_src and scan_begin_src are set to TRIG_TIMER. Note: 'scan_delay' is the number of unwanted scans to discard after each valid scan. The hardware does not support 'scan' timing as such, just a regularly paced conversion timer (with automatic channel switching between conversions). The driver simulates a scan period that is some (>1) multiple of the conversion period times the scan length (chanlist_len samples) by reading chanlist_len samples and discarding the next scan_delay times chanlist_len samples. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-25Staging: comedi: Coding style cleanups in adv_pci_dio.cMark1-127/+180
This patch fixes up many coding style issues in adv_pci_dio.c found by checkpatch.pl Signed-off-by: Mark Rankilor <reodge@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22Staging: comedi: fix code warnings in s626.cJohn Sheehan1-22/+22
A patch for s626.c to fix some of the warnings reported by the checkpatch.pl tool, namely, -suspect code indent for conditional statements -please, no space before tabs Signed-off-by: John Sheehan <john.d.sheehan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22Staging: comedi: fix code style errors in s626.cJohn Sheehan1-28/+39
A patch for s626.c to fix errors reported by checkpatch.pl tool, namely, -code indent should use tabs where possible -"foo * bar" should be "foo *bar" -trailing statements should be on next line Signed-off-by: John Sheehan <john.d.sheehan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22Staging: don't use custom hex_to_bin() implementationAndy Shevchenko1-8/+9
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22staging/trivial: fix typos concerning "initiali[zs]e"Uwe Kleine-König1-1/+1
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18Staging: comedi: drivers: fix coding style issues in pcl812.cGustavo Silva1-217/+259
This is a patch to the pcl812.c file that fixes up the following issues: ERROR: code indent should use tabs where possible x 27 WARNING: line over 80 characters x 37 WARNING: please, no space before tabs x 13 WARNING: braces {} are not necessary for single statement blocks x 2 WARNING: printk() should include KERN_ facility level x 22 WARNING: braces {} are not necessary for any arm of this statement x 5 Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net> Acked-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: Comedi: drivers: Remove comment copied from skel.cIan Abbott2-74/+0
The dmm32at.c and comedi_bond.c comedi driver files contain an instructional comment block copied over from skel.c about how to format a driver comment block. This comment was modified in skel.c by a previous patch in this series to stop Comedi's 'dump_doc' script treating it as an actual driver comment block. There isn't any need to repeat this comment block in the other source files, so rather than modify it, this patch just removes it from those files. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: drivers: skel: Add whitespace to example comment blockIan Abbott1-22/+22
The Comedi team have a script 'dump_doc' to extract text from the driver comment block (starting with line 'Driver:') in (most of) the comedi driver source files. This was recently updated to allow and strip off a " * " prefix at the start of each line (well actually, it uses the perl substitution 's/^ ?\* ?//'). The skel.c file contains an instructional comment block about how to format this driver comment block, but the updated 'dump_doc' script mistakenly treats this as a valid driver comment block. This patch adds some extra whitespace to stop the instructional comment block being treated as a valid driver comment block by Comedi's 'dump_doc' script. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: drivers: das08: Add whitespace to driver comment blockIan Abbott1-5/+5
Previous whitespace changes to das08.c removed some whitespace from a "driver comment block" that the Comedi team would like to keep. "Header continuation lines" in this comment block should be indented with whitespace. (This is after the " * " at the start of each line.) Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: drivers: fix coding style issues in quatech_daqp_cs.cGustavo Silva1-27/+26
This is a patch to the quatech_daqp_cs.c file that fixes up the following issues: ERROR: code indent should use tabs where possible x 1 WARNING: line over 80 characters x 1 WARNING: braces {} are not necessary for single statement blocks x 10 WARNING: printk() should include KERN_ facility level x 6 Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: drivers: fix coding style issues in pcmda12.cGustavo Silva1-5/+7
This is a patch to the pcmda12.c file that fixes up five printk() warning issues Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: drivers: fix coding style issues in pcl816.cGustavo Silva1-83/+140
This is a patch to the pcl816.c file that fixes up the following issues: ERROR: code indent should use tabs where possible x 2 WARNING: line over 80 characters x 34 WARNING: please, no space before tabs x 1 WARNING: braces {} are not necessary for single statement blocks x 6 WARNING: printk() should include KERN_ facility level x 15 WARNING: braces {} are not necessary for any arm of this statement x 1 Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: drivers: Fix coding style issues in pcl711.cGustavo Silva1-7/+7
This is a patch to the pcl711.c file that fixes up printk() warning issues. Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: drivers: fix coding style issues in me4000.cGustavo Silva1-189/+227
This is a patch to the me4000.c file that fixes up the following issues: ERROR: space required after that close brace '}' x 13 ERROR: spaces required around that ':' (ctx:VxV) x 3 WARNING: line over 80 characters x 96 WARNING: braces {} are not necessary for any arm of this statement x 2 Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: Remove typedefsArun Thomas5-25/+19
Remove all remaining typedefs from comedi drivers Signed-off-by: Arun Thomas <arun.thomas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: Remove COMEDI_PCI_INITCLEANUP macroArun Thomas42-82/+1544
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>
2010-06-17Staging: comedi: Remove COMEDI_INITCLEANUP macroArun Thomas59-73/+696
Move the init/exit routines to the respective C source files instead of calling COMEDI_INITCLEANUP Signed-off-by: Arun Thomas <arun.thomas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: Remove COMEDI_MODULES_MACROArun Thomas97-7/+384
Add MODULE_AUTHOR, MODULE_LICENSE, and MODULE_DESCRIPTION calls to the respective C source files instead of calling COMEDI_MODULES_MACRO Signed-off-by: Arun Thomas <arun.thomas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: fix printk() coding style issue in ni_labpc.cMaurice Dawson1-13/+15
This is a patch to the ni_labpc.c file that fixes all, printk() should include KERN-facility level, warnings found by the checkpatch.pl tool Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: drivers: fix space coding style in am9513.hBob Beattie1-11/+11
This is a patch to the file am9513.h that fixes missing space warnings found by the checkpatch.pl tool. Signed-off-by: Bob Beattie <bob.beattie@ntlworld.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: fix code warnings in s626.cJohn Sheehan1-19/+19
A patch for s626.c to fix some of the warnings reported by the checkpatch.pl tool, namely, printk() should include KERN_ facility level unnecessary whitespace before a quoted newline Signed-off-by: John Sheehan <john.d.sheehan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: fix code style errors in unioxx5.cJohn Sheehan1-3/+6
A patch for unioxx5.c which fixes "trailing statements should be on next line" errors raised by the chechpatch.pl tool Signed-off-by: John Sheehan <john.d.sheehan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: Fixed long lines in gsc_hpdi.cMark Rankilor1-10/+20
This patch fixes some long line lengths in gsc_hpdi.c as found by the checkpatch.pl tool Signed-off-by: Mark Rankilor <reodge@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: Checkpatch cleanups in adl_pci9111.cMark Rankilor1-46/+59
This patch cleans up some various warnings generated from checkpatch.pl Signed-off-by: Mark Rankilor <reodge@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: cleanup: remove unneeded null checksDan Carpenter5-10/+5
These checks are obviously pointless because kfree() can handle null dereferences. But really the main problem is that if the pointers were null that would cause problems on the ealier lines. The dereferences would cause an oops and the _release() functions use ->priv to determine which IRQ to free. I looked into it and quite a few of the detach functions assume link->priv is non-null. It seems like we can remove these checks. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: serial2002: Use NULL instead of 0 for pointersIan Abbott1-4/+4
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: serial2002: Reduce stack usage on 'open'Ian Abbott1-21/+23
Reduce stack usage in serial_2002_open() by allocating dig_in_config, dig_out_config, chan_in_config, and chan_out_config temporary arrays using kcalloc() and freeing them when done with. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: serial2002: Fix memory leak on detachIan Abbott1-1/+1
The comedi device 'detach' method for the serial2002 driver has an off-by-one error in its loop for freeing data belonging to its subdevices. Fix it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: serial2002: handle allocation failures on 'open'Ian Abbott1-8/+29
The comedi device 'open' method for the serial2002 driver frees any old 'maxdata_list' and 'range_table_list' arrays belonging to a subdevice and allocates them again, but was missing checks for allocation failure. If an allocation fails, free the 'maxdata_list' and 'range_table_list' arrays for all subdevices and return an error. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: Allow 'open' driver method to failIan Abbott5-8/+23
Some comedi drivers should return an error from their 'open' method when something goes wrong. Change the prototype of the 'open' method in 'struct comedi_device' to allow this, and change the drivers that use it. Propagate any error to the 'open' file operation. The corresponding 'close' method won't be called when the 'open' method fails, so drivers failing the 'open' need to clean up any mess they created. The dt9812 and serial2002 drivers can now return an error on 'open'. The jr3_pci driver also uses the 'open' method but doesn't fail it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17Staging: comedi: ni_tio: fixed brace coding style issues and a few errorsCody Harmon1-30/+19
Fixed code style and placed KERN_ERR in printk statement. Signed-off-by: Cody Harmon <harmonco@engr.orst.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>