Commit Graph

895 Commits (96eb872b2a041b1536ccc6ae2fa87eb28f6e2bb2)

Author SHA1 Message Date
Andreas Bombe 10022a0675 staging: comedi das08_cs.c: Fix io_req_t conversion
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-09-03 17:37:15 -07:00
Linus Torvalds 1685e633b3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* 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-06 12:25:06 -07:00
Greg Kroah-Hartman e9563355ac Staging: Merge staging-next into Linus's tree
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-05 14:18:03 -07:00
Dominik Brodowski 0f52e86ded pcmcia: do not request windows if you don't need to
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-03 09:04:21 +02:00
Dominik Brodowski b5cb259e7f pcmcia: remove memreq_t
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-03 09:04:14 +02:00
Dominik Brodowski 90abdc3b97 pcmcia: do not use io_req_t when calling pcmcia_request_io()
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-03 09:04:11 +02:00
Dominik Brodowski 9a017a9103 pcmcia: do not use io_req_t after call to pcmcia_request_io()
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-08-03 09:03:59 +02:00
Dominik Brodowski ac8b422838 pcmcia: remove cs_types.h
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-30 21:07:39 +02:00
Uwe Kleine-König f69b0d6451 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>
2010-07-22 14:43:10 -07:00
Kulikov Vasiliy 5fc9e4d527 staging: comedi: formatting of pointers in printk()
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-22 12:10:39 -07:00
Mark 7ecac4c38a Staging: comedi: Cleanup style issues in adl_pci9111.c
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-22 11:46:39 -07:00
Kulikov Vasiliy 440a65475d Staging: comedi: pcm3724: remove casts from void*
Remove unnesessary casts from void*.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:46:59 -07:00
Kulikov Vasiliy 20fb228081 Staging: comedi: use for_each_pci_dev()
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-08 13:15:16 -07:00
Mark 27bf0bc906 Staging: comedi: Cleanup on dmm32at.c from checkpatch.pl
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-08 13:15:16 -07:00
Mark 97feeef5c5 Staging: comedi: Cleanup adv_pci1710.c from checkpatch.pl
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-08 13:15:16 -07:00
Gustavo Silva 2312202c4a Staging: comedi: kcomedilib: fix coding style issues in kcomedilib_main.c
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-08 13:15:16 -07:00
Maurice Dawson 1309e617bc Staging: comedi: fix over 80 character coding style issue in ni_labpc.c
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-07-08 13:15:15 -07:00
Dan Carpenter 821e67a135 Staging: comedi: fix read past end of array in cb_pcidda_attach()
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-30 08:18:15 -07:00
Ian Abbott 6c2fd30804 Staging: comedi: drivers: adl_pci9111: Fix AI commands in TRIG_FOLLOW case
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-30 08:18:14 -07:00
Mark 3afbe13cbe Staging: comedi: Coding style cleanups in adv_pci_dio.c
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-25 11:11:22 -07:00
John Sheehan ae6eb75c63 Staging: comedi: fix code warnings in s626.c
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-22 15:38:07 -07:00
John Sheehan add74595e5 Staging: comedi: fix code style errors in s626.c
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-22 15:38:07 -07:00
Andy Shevchenko 3ff16c257a Staging: don't use custom hex_to_bin() implementation
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 15:02:17 -07:00
Uwe Kleine-König 37523e84cb staging/trivial: fix typos concerning "initiali[zs]e"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:58:01 -07:00
Gustavo Silva 3cc544df93 Staging: comedi: drivers: fix coding style issues in pcl812.c
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-18 09:16:44 -07:00
Ian Abbott 80370692f6 Staging: Comedi: drivers: Remove comment copied from skel.c
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-17 16:03:59 -07:00
Ian Abbott 9a390f38b6 Staging: comedi: drivers: skel: Add whitespace to example comment block
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-17 16:03:58 -07:00
Ian Abbott 389cd417e3 Staging: comedi: drivers: das08: Add whitespace to driver comment block
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-17 16:03:58 -07:00
Gustavo Silva 3420f6b4c1 Staging: comedi: drivers: fix coding style issues in quatech_daqp_cs.c
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-17 15:54:24 -07:00
Gustavo Silva 8b83e005d1 Staging: comedi: drivers: fix coding style issues in pcmda12.c
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-17 15:54:24 -07:00
Gustavo Silva 4c68fb42c2 Staging: comedi: drivers: fix coding style issues in pcl816.c
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-17 15:54:24 -07:00
Gustavo Silva 8f4e80af3a Staging: comedi: drivers: Fix coding style issues in pcl711.c
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-17 15:54:12 -07:00
Gustavo Silva b6241fda0a Staging: comedi: drivers: fix coding style issues in me4000.c
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-17 15:54:12 -07:00
Arun Thomas 56b8421cee Staging: comedi: Remove typedefs
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-17 13:49:07 -07:00
Arun Thomas 727b286b44 Staging: comedi: Remove COMEDI_PCI_INITCLEANUP macro
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-17 13:48:12 -07:00
Arun Thomas 7114a28011 Staging: comedi: Remove COMEDI_INITCLEANUP macro
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-17 13:47:00 -07:00
Arun Thomas 90f703d30d Staging: comedi: Remove COMEDI_MODULES_MACRO
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-17 13:45:47 -07:00
Maurice Dawson 88d8ed4b64 Staging: comedi: fix printk() coding style issue in ni_labpc.c
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-17 13:44:15 -07:00
Bob Beattie 0c55484dca Staging: comedi: drivers: fix space coding style in am9513.h
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-17 13:43:12 -07:00
John Sheehan daca497d80 Staging: comedi: fix code warnings in s626.c
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-17 13:36:34 -07:00
John Sheehan 6fd071cccf Staging: comedi: fix code style errors in unioxx5.c
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-17 13:36:34 -07:00
Mark Rankilor 4c67da06f0 Staging: comedi: Fixed long lines in gsc_hpdi.c
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-17 13:36:34 -07:00
Mark Rankilor 2f6df34cd3 Staging: comedi: Checkpatch cleanups in adl_pci9111.c
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-17 13:36:33 -07:00
Dan Carpenter f25bd6bfdf Staging: comedi: cleanup: remove unneeded null checks
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-17 13:36:33 -07:00
Ian Abbott c5da20905c Staging: comedi: serial2002: Use NULL instead of 0 for pointers
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-17 13:28:57 -07:00
Ian Abbott 668f272e57 Staging: comedi: serial2002: Reduce stack usage on 'open'
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-17 13:28:57 -07:00
Ian Abbott fa3b5d9ab0 Staging: comedi: serial2002: Fix memory leak on detach
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-17 13:28:56 -07:00
Ian Abbott 9e7f225688 Staging: comedi: serial2002: handle allocation failures on 'open'
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-17 13:28:56 -07:00
Ian Abbott 3c17ba0743 Staging: comedi: Allow 'open' driver method to fail
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-17 13:28:56 -07:00
Cody Harmon 3d34023a99 Staging: comedi: ni_tio: fixed brace coding style issues and a few errors
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>
2010-06-17 11:42:58 -07:00