aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
| * staging:iio:ad7476: Use be16_to_cpup instead of open-coding itLars-Peter Clausen2012-09-15
| | | | | | | | | | Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Squash driver into a single file.Lars-Peter Clausen2012-09-15
| | | | | | | | | | | | | | | | | | | | | | After the recent cleanups the buffer support is just a single 23 line function. This does not really justify a file on its own, so move it to the main driver file. And with only one source file left the header file containing the device state struct becomes superflousious so move the content of the header file to the main driver source file as well. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Rework reference voltage handlingLars-Peter Clausen2012-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | Slightly rework the reference voltage handling for the ad7476 driver. Now the only way to specify a external reference voltage is to use the regulator API, previously it was possible to use either platform_data or the regulator API. The new way is more consistent with what other drivers do. Also do not ignore errors when requesting the regulator, since this will cope very poorly with e.g. deferred probing. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Avoid alloc/free for each sample in buffered modeLars-Peter Clausen2012-09-13
| | | | | | | | | | | | | | | | | | | | The ad7476 driver has only support for 1 channel ADCs. So the upper limit for the buffer size is the size of one sample plus the size of the timestamp. Preallocate a buffer large enough to hold this to avoid having to allocate and free a new buffer for each sample being captured. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Remove duplicated chip info entriesLars-Peter Clausen2012-09-13
| | | | | | | | | | | | | | | | | | Some of the parts supported by this driver are software compatible. The difference between them is only in the operating voltage range. So we do not need extra chip info entries for them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Fix off by one error for channel shiftLars-Peter Clausen2012-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | The datasheet is a bit confusing about this. It says that a dataword has 4 leading zeros, but the first zero is already put on the bus when CS is pulled low and the second zero is put on the bus on the first leading edge of SCLK, so when the first bit is sampled on the first trailing edge it will sample what the datasheet refers to as the second leading zero. Subsequently we only see 3 leading zeros in the 16 bit dataword and the result we get is shifted to the left by one bit. Fix this by adjusting the channel shift by 1. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging/gdm72xx: usb_boot: replace firmware upgrade API in em_downloadMacpaul Lin2012-09-17
| | | | | | | | | | | | | | | | | | | | | | | | Replace firmware upgrade API in em_download_image(). Signed-off-by: Macpaul Lin <macpaul@gmail.com> Cc: Paul Stewart <pstew@chromium.org> Cc: Ben Chan <benchan@chromium.org> Cc: Sage Ahn <syahn@gctsemi.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/rts_pstor: Use pr_ or dev_ printks in rtsx.cToshiaki Yamane2012-09-17
| | | | | | | | | | | | | | | | | | | | | | | | fixed some checkpatch warnings. -WARNING: Prefer pr_info(... to printk(KERN_INFO, ... -WARNING: Prefer pr_err(... to printk(KERN_ERR, ... -WARNING: quoted string split across lines And added pr_fmt. Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-17
| | | | | | | | | | | | | | last of the unstylistic pointers cleaned up Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-17
| | | | | | | | | | | | | | pointer style cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-17
| | | | | | | | | | | | | | more checkpatch cleanups of pointers. Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-17
| | | | | | | | | | | | | | More pointer style cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-17
| | | | | | | | | | | | | | More notation fixes Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-17
| | | | | | | | | | | | | | first chunk, straighten up the pointer notation Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch cleanup: fix includesDaniel Cotey2012-09-17
| | | | | | | | | | | | | | checkpatch fixups Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch cleanup: header file whitespaceDaniel Cotey2012-09-17
| | | | | | | | | | | | | | Finish trailing spaces in libbp_sd.h Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch cleanup: header file whitespaceDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bypass.h: checkpatch whitespaceDaniel Cotey2012-09-17
| | | | | | | | | | | | | | Remove trailing spaces, second chunk Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bypass.h: checkpatch whitespaceDaniel Cotey2012-09-17
| | | | | | | | | | | | | | Remove trailing spaces, first chunk Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-17
| | | | | | | | | | | | | | 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>
* | staging: speakup_soft: Fix reading of init stringBen Hutchings2012-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: silicom: fix a comparing proc_dir_entry pointer against 0Devendra Naga2012-09-17
| | | | | | | | | | | | | | | | | | 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>
* | staging: ft1000: replace c99 comments with c88Devendra Naga2012-09-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>
* | Staging: silicom: use kstrtoint_from_user()Dan Carpenter2012-09-17
| | | | | | | | | | | | | | | | | | | | 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>
* | Staging: silicom: add some range checks to proc functionsDan Carpenter2012-09-17
| | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: mite: use module_init()/module_exit()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: mite: remove list of devicesIan Abbott2012-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: ni_pcimio: use mite_alloc()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: ni_pcidio: use mite_alloc()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: ni_labpc: use mite_alloc()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: ni_670x: remove spurious free_irq() callIan Abbott2012-09-17
| | | | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: ni_670x: use mite_alloc()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: ni_660x: use mite_alloc()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: ni_65xx: use mite_alloc()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: ni_6527: use mite_alloc()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: mite: add mite_alloc() and mite_free()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: mite: replace printk() callsIan Abbott2012-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: mite: use ilog2()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: comedi: mite: export mite_alloc_ring() and mite_free_ring()Ian Abbott2012-09-17
| | | | | | | | | | | | | | | | | | | | 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>