summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2012-09-17Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey1-35/+35
last of the unstylistic pointers cleaned up Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey1-41/+41
pointer style cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey1-33/+33
more checkpatch cleanups of pointers. Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey1-33/+33
More pointer style cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey1-32/+32
More notation fixes Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey1-23/+23
first chunk, straighten up the pointer notation Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: checkpatch cleanup: fix includesDaniel Cotey1-4/+1
checkpatch fixups Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: checkpatch cleanup: header file whitespaceDaniel Cotey1-26/+26
Finish trailing spaces in libbp_sd.h Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: checkpatch cleanup: header file whitespaceDaniel Cotey1-71/+71
Whack all the line ending spaces so checkpatch.pl is happy. Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bypass.h: checkpatch whitespaceDaniel Cotey1-27/+27
Remove trailing spaces, second chunk Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bypass.h: checkpatch whitespaceDaniel Cotey1-2/+2
Remove trailing spaces, first chunk Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-5/+5
twelfth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-22/+22
eleventh chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-16/+16
tenth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-24/+24
ninth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-15/+15
eighth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-27/+27
seventh chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-5/+5
sixth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-6/+6
fifth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-15/+15
fourth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-13/+13
third chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-8/+8
second chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey1-3/+3
first chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: speakup_soft: Fix reading of init stringBen Hutchings1-9/+4
softsynth_read() reads a character at a time from the init string; when it finds the null terminator it sets the initialized flag but then repeats the last character. Additionally, if the read() buffer is not big enough for the init string, the next read() will start reading from the beginning again. So the caller may never progress to reading anything else. Replace the simple initialized flag with the current position in the init string, carried over between calls. Switch to reading real data once this reaches the null terminator. (This assumes that the length of the init string can't change, which seems to be the case. Really, the string and position belong together in a per-file private struct.) Tested-by: Samuel Thibault <sthibault@debian.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: silicom: fix a comparing proc_dir_entry pointer against 0Devendra Naga1-3/+1
we should be using the NULL macro, not 0 to compare against a pointer value, and also remove braces around the single if conditional after the create_proc_entry Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: ft1000: replace c99 comments with c88Devendra Naga1-17/+17
replace some of the c99 comments to the structures with c88 comment style no code change is done here. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: use kstrtoint_from_user()Dan Carpenter1-22/+10
The main problem with the hand rolled code was that there weren't any range checks so you could corrupt memory by writing too much data to the proc file. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17Staging: silicom: add some range checks to proc functionsDan Carpenter1-0/+24
If you tried to cat more than 255 characters (the last character is for the terminator) to these proc files then it would corrupt kernel memory. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: mite: use module_init()/module_exit()Ian Abbott1-4/+5
Rename the standard `init_module()` and `cleanup_module()` functions and make them static. Use `module_init()` and `module_exit()` to mark the renamed functions as the module init and exit functions. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: mite: remove list of devicesIan Abbott2-63/+0
All the drivers that use the "mite" module now allocate a `struct mite_struct` dynamically instead of searching the `mite_devices` list populated during initialization of the "mite" module. Remove the list of devices and the function that prints available NI devices on the list (`mite_list_devices()`). The list node and `used` members in `struct mite_struct` are now redundant, so remove them. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_pcimio: use mite_alloc()Ian Abbott1-17/+5
Allocate `struct mite_device` dynamically instead of searching for one on the `mite_devices` list constructed by the "mite" module. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_pcidio: use mite_alloc()Ian Abbott1-17/+5
Allocate `struct mite_device` dynamically instead of searching for one on the `mite_devices` list constructed by the "mite" module. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_labpc: use mite_alloc()Ian Abbott1-17/+5
Allocate `struct mite_device` dynamically instead of searching for one on the `mite_devices` list constructed by the "mite" module. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_670x: remove spurious free_irq() callIan Abbott1-3/+0
This driver's comedi `detach` handler (`ni_670x_detach()`) calls `free_irq()` but the driver doesn't call `request_irq()` anywhere. Remove the spurious call. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_670x: use mite_alloc()Ian Abbott1-17/+5
Allocate `struct mite_device` dynamically instead of searching for one on the `mite_devices` list constructed by the "mite" module. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_660x: use mite_alloc()Ian Abbott1-16/+3
Allocate `struct mite_device` dynamically instead of searching for one on the `mite_devices` list constructed by the "mite" module. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_65xx: use mite_alloc()Ian Abbott1-17/+5
Allocate `struct mite_device` dynamically instead of searching for one on the `mite_devices` list constructed by the "mite" module. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_6527: use mite_alloc()Ian Abbott1-17/+5
Allocate `struct mite_device` dynamically instead of searching for one on the `mite_devices` list constructed by the "mite" module. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: mite: add mite_alloc() and mite_free()Ian Abbott2-11/+29
Add `mite_alloc()` to allow drivers to allocate and initialize a `struct mite_struct` dynamically and export it. Add `mite_free()`, which is currently just an inline wrapper for `kfree()`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: mite: replace printk() callsIan Abbott2-95/+89
Replace the `printk()` calls in this module with `dev_...()` calls where possible or `pr_...()` calls otherwise. Rework the normally ifdefed out (by the `DEBUG_MITE` macro) `mite_dump_regs()` to dump register offsets instead of remapped addresses. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: mite: use ilog2()Ian Abbott1-7/+7
The static inline functions `MITE_IODWBSR_1_WSIZE_bits()` and `CR_RL()` in "mite.h" work out a base-2 logarithm using a `while` loop. Change them to use `ilog2()`. Also change `CR_RL()` to clamp the maximum value instead of printing an error. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: mite: export mite_alloc_ring() and mite_free_ring()Ian Abbott2-34/+37
The `mite_alloc_ring()` and `mite_free_ring()` static inline functions in "mite.h" are reasonably large. Transfer them to "mite.c" and export them. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: mite: make internal functions staticIan Abbott2-5/+3
Declare some non-exported functions in "mite.c" `static` and remove their declarations from "mite.h". Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_pcimio: Use comedi attach_pci callbackIan Abbott1-37/+39
Convert this PCI driver to use the comedi `attach_pci` callback instead of the `attach` callback for PCI auto-configuration. There is no need to support manual attachment of PCI devices supported by this driver, so remove the `attach` callback altogether. Note that this driver still uses the list of PCI "mite" devices created by the "mite" module. This will be dealt with by a later patch once dynamic allocation of "mite" structures has been implemented. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_pcimio: Add semicolon to module_comedi_pci_driver()Ian Abbott1-1/+1
Add a semi-colon after the macro call `module_comedi_pci_driver(ni_pcimio_driver, ni_pcimio_pci_driver)`. It compiles with or without the semicolon but it ought to have it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_mio_common: don't pass config options to ni_E_init()Ian Abbott4-4/+4
`ni_E_init()` doesn't use the second parameter pointing to a `struct comedi_devconfig` passed from a comedi `attach` handler, so remove the parameter. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_pcidio: use comedi attach_pci callbackIan Abbott1-22/+27
Convert this PCI driver to use the comedi `attach_pci` callback instead of the `attach` callback for PCI auto-configuration. There is no need to support manual attachment of PCI devices supported by this driver, so remove the `attach` callback altogether. Note that this driver still uses the list of PCI "mite" devices created by the "mite" module. This will be dealt with by a later patch once dynamic allocation of "mite" structures has been implemented. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_pcidio: use request_firmware()Ian Abbott1-25/+36
The PCI-6534 needs three firmware files loading to work with the driver. That is currently done by passing the firmware data using the `COMEDI_DEVCONFIG` ioctl that uses the comedi `attach()` hook in the driver. This doesn't work for auto-configured PCI devices (which also currently use the `attach()` hook in this driver, but doesn't have the firmware-loading options set in the `struct comedi_devconfig *` parameter). Change the driver to request the firmware files using `request_firmware()`, ignoring any firmware-loading options set in the `struct comedi_devconfig`. The PCI-6534 has a main FPGA which needs to be loaded first, and two "scarabs". Scarab A is loaded with firmware to support digital input mode, and scarab B is loaded with firmware to support digital output mode. I don't think the order of loading the scarab firmwares matters as long as they are loaded with the correct firmware files. This update loads scarab B first, whereas the original code loaded scarab A first. The firmware files are loaded in the following order: A) main FPGA: "ni6534a.bin" (FW_PCI_6534_MAIN) B) scarab B: "niscrb02.bin" (FW_PCI_6534_SCARAB_DO) C) scarab A: "niscrb01.bin" (FW_PCI_6534_SCARAB_DI) The required firmware files can be found in the "comedi-nonfree-firmware" tar-ball at <http://www.comedi.org/download/comedi-nonfree-firmware-2007.06.22.tar.gz>. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_pcidio: convert printk() callsIan Abbott1-46/+47
Convert the `printk()` calls in this driver to use the `dev_...()` calls where possible, or the `pr_...()` calls otherwise. Combine non-line-terminated prints into single-line prints. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: comedi: ni_labpc: use comedi attach_pci callbackIan Abbott1-46/+60
Convert this PCI driver to use the comedi `attach_pci` callback instead of the `attach` callback for PCI auto-configuration. Remove support for manual attachment of PCI boards supported by this driver. The `attach` callback is still needed to manually attach ISA boards, but print an error if an attempt is made to manually attach a PCI board. Note that this driver still uses the list of PCI "mite" devices created by the "mite" module. This will be dealt with by a later patch once dynamic allocation of "mite" structures has been implemented. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>