- 23 Jun, 2012 10 commits
-
-
H Hartley Sweeten authored
The private DEBUG macro defined in this driver outputs a lot of function tracing noise. This information might be useful when first developing the driver but should not be in the mainlined code. If any of this is needed in the future it should be added back using the proper dev_printk interface. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Move up the remaining functions needed to remove the forward declarations. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Move the enc_private_data definition down to remove the need for the forward declarations. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Move the irq set/reset/clear and ns_to_timer helper functions up to remove the need for the forward declarations. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Move the DAC functions up to remove the need for the forward declarations. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Move the I2C functions up to remove the need for the forward declarations. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Move the DEBI* i/o functions up to remove the need for the forward declarations. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Move the s626_attach and s626_detach functions down to match the coding style of the other comedi drivers. Then remove the forward declarations that are no longer needed. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
pdma->LogicalBase is a void *, NULL should be used to clear it not 0. This quiets a sparse warning about: warning: Using plain integer as NULL pointer Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The 'ResetADC' function is prototyped as a static but is missing the static tag in it's definition. The function is only referenced in this file so add the static tag to the definition. This quiets a sparse warning about: warning: symbol 'ResetADC' was not declared. Should it be static? Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 19 Jun, 2012 2 commits
-
-
H Hartley Sweeten authored
The comedi_subdevice 'insn_bits' functions return the number of data elements used to perform the command. Most of the insn_bits functions return an open coded '2' to indicate this. The same value is available as 'insn->n'. Return that instead to better indicate what the return means. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
The comedi core does the sanity check to make sure that the data length the INSN_BITS instruction is 2. There is no need for the drivers to do this check. Remove all the sanity checks in the drivers. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 12 Jun, 2012 2 commits
-
-
H Hartley Sweeten authored
comedi_alloc_subdevices can fail with -EINVAL or -ENOMEM. When it does fail make sure to pass the proper error code back. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbott@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Move the inline alloc_subdevices() function from comedidev.h to drivers.c and rename it to comedi_alloc_subdevices(). The function is large enough to warrant being an exported symbol rather than being an inline in every driver. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 Jun, 2012 2 commits
-
-
H Hartley Sweeten authored
The base_addr variable in struct s626_private is an ioremap'ed pci resource and should be void __iomem * not a void *. This quiets a lot of sparse warings for the writel and readl calls like: warning: incorrect type in argument 1 (different address spaces) expected void const volatile [noderef] <asn:2>*addr got void *<noident> warning: incorrect type in argument 2 (different address spaces) expected void volatile [noderef] <asn:2>*addr got void * Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
H Hartley Sweeten authored
Remove the private header, comedi_pci.h, by moving the two helper functions into divers.c and providing the prototypes in comedidev.h. This allows the comedi_pci_enable/disable helper functions to be shared instead of having an inline version in every comedi pci driver. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 19 May, 2012 1 commit
-
-
H Hartley Sweeten authored
1. Change the return type from int to void All the detach functions, except for the comedi usb drivers, simply return success (0). Plus, the return code is never checked in the comedi core. The comedi usb drivers do return error codes but the conditions can never happen. The first check is: if (!dev) return -EFAULT; This checks that the passed comedi_device pointer is valid. The detach function itself is called using this pointer so it MUST always be valid or there is a bug in the core: if (dev->driver) dev->driver->detach(dev); And the second check: usb = dev->private; if (!usb) return -EFAULT; The dev->private pointer is setup in the attach function to point to the probed usb device. This value could be NULL if the attach fails. But, since the comedi core is going to unload the driver anyway and does not check for errors there is no gain by returning one. After removing these checks from the comedi usb drivers the detach functions required a bit of cleanup. 2. Remove all the printk noise in the detach functions All of the printk output is really just noise. The user did a rmmod to unload the driver, we really don't need to tell them about it. Also, some of the messages are output using: dev_dbg(dev->hw_dev, ... or dev_info(dev->hw_dev, ... Unfortunately the hw_dev value is only used by drivers that are doing DMA. For most drivers this variable is going to be NULL so the output is not going to work as expected. 3. Refactor a couple static 'free_resource' functions into the detach functions. The 'free_resource' function is only being called by the detach and it makes more sense to just absorb the code. 4. Remove a couple unnecessary braces for single statements. 5. Remove unnecessary comments. Most of the comedi drivers appear to be based on the comedi skel driver and have the comments from that driver included. These comments make sense in the skel driver for reference but they don't need to be in any of the actual drivers. 6. Remove all the extra whitespace. It's not needed to make the functions any more readable. 7. Remove the now unused 'attached_successfully' variable in the cb_pcimdda driver. This variable was only used to conditionally output some driver noise during the detach. Since all the printk's have been removed this variable is no longer necessary. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 14 May, 2012 1 commit
-
-
H Hartley Sweeten authored
Convert the refactored comedi pci drivers to use the module_comedi_pci_driver() macro which makes the code smaller and a bit simpler. In the process, rename some of the symbols in the driver to standardize the comedi pci drivers. Based on the driver {name}: 1) Rename the comedi_driver to {name}_driver. 2) Use a static string {name} for the comedi_driver.driver_name. 3) Rename the pci probe/remove functions to {name)_pci_probe/remove. 4) Rename the pci id_table to {name}_pci_table. 5) Add the static string {name} for the pci_driver.name. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 May, 2012 1 commit
-
-
H Hartley Sweeten authored
Move the module_init/module_exit routines and the associated struct comedi_driver and other variables to the end of the source. This is more typical of how other drivers are written and removes the need for the forward declarations. Signed-off-by:
H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 24 Apr, 2012 1 commit
-
-
Gerard Snitselaar authored
s626_attach is referencing s626_pci_table which is annotated __devinitconst. Put pci vendor/device ids in the s626_board struct and use s626_boards instead similar to what is done in gsc_hpdi. v2: I had moved the PCI id defines to s626.h earlier, but later decided to leave them in s626.c and forgot to move them up above where they are being used in s626_boards. Signed-off-by:
Gerard Snitselaar <dev@snitselaar.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 10 Apr, 2012 1 commit
-
-
Ian Abbott authored
The comedi_pci_auto_config() and comedi_usb_auto_config() functions currently take a board name parameter which is actually a driver name parameter. Replace it with a pointer to the struct comedi_driver. This will allow comedi_pci_auto_config() and comedi_usb_auto_config() to call bus-type-specific auto-configuration hooks in the struct comedi_driver if they exist (they don't yet). The idea is that these bus-type-specific auto-configuration hooks won't have to search the bus for the device being auto-configured like 'attach()' hook has to. Signed-off-by:
Ian Abbott <abbotti@mev.co.uk> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 31 Mar, 2011 1 commit
-
-
Lucas De Marchi authored
Fixes generated by 'codespell' and manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi>
-
- 22 Jun, 2010 2 commits
-
-
John Sheehan authored
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>
-
John Sheehan authored
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>
-
- 17 Jun, 2010 2 commits
-
-
Arun Thomas authored
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>
-
John Sheehan authored
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>
-
- 04 Mar, 2010 1 commit
-
-
Uwe Kleine-König authored
This patch was generated by git grep -E -i -l '[Aa]quire' drivers/staging | xargs -r perl -p -i -e 's/([Aa])quire/$1cquire/' Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- 11 Dec, 2009 1 commit
-
-
Dirk Hohndel authored
something-bility is spelled as something-blity so a grep for 'blit' would find these lines this is so trivial that I didn't split it by subsystem / copy additional maintainers - all changes are to comments The only purpose is to get fewer false positives when grepping around the kernel sources. Signed-off-by:
Dirk Hohndel <hohndel@infradead.org> Signed-off-by:
Jiri Kosina <jkosina@suse.cz> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- 15 Sep, 2009 2 commits
-
-
Roel Kluin authored
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>
-
Mithlesh Thukral authored
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>
-
- 12 Jul, 2009 1 commit
-
-
Herton Ronaldo Krzesinski authored
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>
-
- 19 Jun, 2009 6 commits
-
-
Greg Kroah-Hartman authored
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>
-
Greg Kroah-Hartman authored
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>
-
Bill Pemberton authored
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>
-
Bill Pemberton authored
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>
-
Roel Kluin authored
Remove tests for negative unsigned. Signed-off-by:
Roel Kluin <roel.kluin@gmail.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jiri Slaby authored
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>
-
- 03 Apr, 2009 3 commits
-
-
Bill Pemberton authored
Signed-off-by:
Bill Pemberton <wfp5p@virginia.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Bill Pemberton authored
Signed-off-by:
Bill Pemberton <wfp5p@virginia.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Bill Pemberton authored
Signed-off-by:
Bill Pemberton <wfp5p@virginia.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-