Age | Commit message (Collapse) | Author | Files | Lines |
|
hdr->ioc_len is a user controlled u32 so the addition can overflow,
especially on 32 bit systems.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove an unneeded return statement in this file
Signed-off-by: Achille Aknin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
remove space between function names and open parentheses as reported by
checkpatch.pl.
Signed-off-by: Auguste Olivry <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace two occurrences of "+1" with simply "1".
Signed-off-by: Luca Wehrstedt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Power down device when an error occurs in order to avoid wasting
power. Move powerdown function up to be seen by the new call and
align parameters for the ltr501_write_contr() call.
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix the following checkpatch warning:
WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ...
then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
Signed-off-by: Ioana Ciornei <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch marks functions llog_cat_set_first_idx and cat_cancel_cb
static as these are used only within this file. Also since cat_cancel_cb
is made static do not export it.
This eliminates the following sparse warning:
warning: symbol * was not declared. Should it be static?
Signed-off-by: Darshana Padmadas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch makes functions mgc_logname2resid, mgc_set_info_async
and mgc_init static as these are only used internally.
This also eliminates sparse warnings of the type:
warning: symbol * was not declared. Should it be static?
Signed-off-by: Darshana Padmadas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch includes the header file mdc_internal.h that declares the
function lprocfs_mdc_init_vars.
This also eliminates the sparse warning:
warning: symbol 'lprocfs_mdc_init_vars' was not declared. Should it be static?
Signed-off-by: Darshana Padmadas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch includes the header lustre/include/lclient.h that declares
the functions lov_lsm_put and lov_read_and_clear_async_rc defined in
lov_object.c.
This eliminates warnings reported by sparse:
warning: symbol was not declared. Should it be static?
Signed-off-by: Darshana Padmadas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch includes the header file lmv_internal.h that declares
the function lprocfs_lmv_init_vars defined in lproc_lmv.c.
This eliminates the sparse warning:
warning: symbol 'lprocfs_lmv_init_vars' was not declared. Should it be static?
Signed-off-by: Darshana Padmadas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The function obd_proc_version_seq_show is only used in this
file, so make it static.
This eliminates the following sparse warning:
warning: symbol 'obd_proc_version_seq_show' was not declared. Should it be static?
Signed-off-by: Darshana Padmadas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Sparse reported the following warnings:
warning: symbol 'lstcon_console_init' was not declared. Should it be static?
warning: symbol 'lstcon_console_fini' was not declared. Should it be static?
warning: symbol 'lstcon_ioctl_entry' was not declared. Should it be static?
However since these functions are used in other files,
they cannot be made static, so add protoypes for the same in console.h.
Signed-off-by: Darshana Padmadas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Removes variable comparison with 0 by using !. Done using following
coccinelle script.
@ disable is_zero,isnt_zero @
expression *E;
expression E1,f;
@@
E = f(...)
<...
(
- E == 0
+ !E
|
- E != 0
+ E
|
- 0 == E
+ !E
|
- 0 != E
+ E
)
...>
?E = E1
@ disable is_zero,isnt_zero @
expression *E;
@@
(
E ==
- 0
+ NULL
|
E !=
- 0
+ NULL
|
- 0
+ NULL
== E
|
- 0
+ NULL
!= E
)
Signed-off-by: Amitoj Kaur Chawla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Delete duplicated argument to | for the state argument in
the _clr_fwstate_() function call as it is redundant.
Detected with coccinelle.
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use memdup_user() to avoid its duplicated implementation and simplify
code. memdup_user() uses GFP_KERNEL instead of GFP_ATOMIC,
which is valid because copy_from_user() might sleep and it's useless
to make the allocation atomic. Found with coccinelle.
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Place driver on standby mode on error in order to prevent wasting
power. Move standby function above to be seen by the new call.
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes explicit NULL comparison and writes it in its
equivalent shorter form. Done with coccinelle.
@replace_rule@
expression e;
@@
-e == NULL
+ !e
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes explicit NULL comparison and writes it in its
shorter form. Detected with coccinelle.
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes explicit NULL comparison and replaces it with
its shorter form. Detected with coccinelle.
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes explicit NULL comparison and replaces it
with its shorter form. Detected with coccinelle.
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes explicit NULL comparison and replaces it with
its shorter form. Detected with coccinelle.
@replace_rule@
expression e;
@@
-e == NULL
+ !e
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes explicit NULL comparison and writes it in its
simpler form. Done with coccinelle:
@replace_rule@
expression e;
@@
-e == NULL
+ !e
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:
@replace_rule@
expression e;
@@
-e == NULL
+ !e
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch checks if an error occurred on probe and stops the
device in order to avoid wasting power.
Signed-off-by: Cristina Opriceana <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second set of new devices, functionality and cleanup for IIO in the 4.1 cycle.
New Functionality
* Watermark logic for buffers. Allows for blocking reads to block until
their requested amount is available - previously they only blocked until
a single scan of data was available. Also allows for polling for a
watermark amount of data to be available. This feature was first proposed
some time ago to good responses, but not taken further by the original author
Octavian has picked up the gauntlet and taken it through
to merging (along with the hardware fifo support that follows).
* New approach to hardware fifo handling - in particular handling the
interaction of a hardware fifo feeding into a software fifo and their
watershed events. We don't have every possible case well covered yet,
but this is certainly a good, flexible starting point. This will replace
the previous approach used in ancient drivers (sca3000) where we just
exposed the hardware buffer directly to userspace. Very few pieces of
hardware have sufficiently long buffers for that to be an adequate solution.
* bmc150_accel - hardware fifo support.
* mlx90614 - support dual IR sensor devices + some refactoring to clean up the
code and allow some other functionality currently under review.
* L3GD20H gyroscope support added to the st_gyro driver.
* lis3lv02d accelerometer added to the st_gyro driver. Note this part is
also supported by the older lis3 driver under misc. A lengthy discussion
took place and concluded that holding parts out on the basis that whole
driver would be subsumed into this one was counter productive. Better
to add part support and add additional features as people need them.
Basically there was not advantage in not merging the support.
* max517 driver gains support for MAX520 and MAX521 DACs.
Documentation
* 3.20 -> 4.0 renaming for recent docs. Whilst technically a fix, I think
people will cope until the next merge merge window.
* An ABI typo hat -> What: More ABIs should have hats.
* Document in_rot_offset, illuminance_raw and illuminance_scale.
Cleanups
* Fix a scale extraction bug in generic_buffer.c example.
* Constify a load of device tree related structures.
|
|
Kernel version for new ABI in 4.0 has been documented
as 3.20, since the changes have been merged before the kernel
version number change.
Change kernel version from 3.20 to 4.0.
Signed-off-by: Irina Tirdea <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
Signed-off-by: Martin Kepplinger <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
The model is detected by reading the EEPROM configuration during
probing.
Signed-off-by: Vianney le Clément de Saint-Marcq <[email protected]>
Cc: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
Add symbols for all accessible RAM and EEPROM registers, as well as the
sleep command and timings defined in the datasheet.
Signed-off-by: Vianney le Clément de Saint-Marcq <[email protected]>
Cc: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
We only advertise hardware fifo support if the I2C bus supports full
I2C or smbus I2C block data reads since it is mandatory to read the
full frame in one read (otherwise the rest of the frame is discarded).
The hardware fifo is enabled only when triggers are not active because:
(a) when using the any-motion trigger the user expects to see samples
based on ROC events, but the fifo stores samples based on the sample
frequency
(b) the data-ready trigger is waking the CPU for for every sample, so
using the hardware fifo does not have any benefit
Signed-off-by: Octavian Purdila <[email protected]>
Reviewed-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
Some devices have hardware buffers that can store a number of samples
for later consumption. Hardware usually provides interrupts to notify
the processor when the FIFO is full or when it has reached a certain
watermark level. This helps with reducing the number of interrupts to
the host processor and thus it helps decreasing the power consumption.
This patch enables usage of hardware FIFOs for IIO devices in
conjunction with software device buffers. When the hardware FIFO is
enabled the samples are stored in the hardware FIFO. The samples are
later flushed to the device software buffer when the number of entries
in the hardware FIFO reaches the hardware watermark or when a flush
operation is triggered by the user when doing a non-blocking read
on an empty software device buffer.
In order to implement hardware FIFO support the device drivers must
implement the following new operations: setting and getting the
hardware FIFO watermark level, flushing the hardware FIFO to the
software device buffer. The device must also expose information about
the hardware FIFO such it's minimum and maximum watermark and if
necessary a list of supported watermark values. Finally, the device
driver must activate the hardware FIFO when the device buffer is
enabled, if the current device settings allows it.
The software device buffer watermark is passed by the IIO core to the
device driver as a hint for the hardware FIFO watermark. The device
driver can adjust this value to allow for hardware limitations (such
as capping it to the maximum hardware watermark or adjust it to a
value that is supported by the hardware). It can also disable the
hardware watermark (and implicitly the hardware FIFO) it this value is
below the minimum hardware watermark.
Since a driver may support hardware FIFO only when not in triggered
buffer mode (due to different semantics of hardware FIFO sampling and
triggered sampling) this patch changes the IIO core code to allow
falling back to non-triggered buffered mode if no trigger is enabled.
Signed-off-by: Octavian Purdila <[email protected]>
Reviewed-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
Currently the IIO buffer blocking read only wait until at least one
data element is available.
This patch makes the reader sleep until enough data is collected before
returning to userspace. This should limit the read() calls count when
trying to get data in batches.
Co-author: Yannick Bedhomme <[email protected]>
Signed-off-by: Josselin Costanzi <[email protected]>
[rebased and remove buffer timeout]
Signed-off-by: Octavian Purdila <[email protected]>
Reviewed-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
It can be used exactly like L3GD20 but it has a different WhoAmI
register value.
Signed-off-by: Robert Dolca <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
When using generic_buffer to read data, the scale is not properly
detected for scale shared by type. This is caused by a problem
with the generation of generic name out of the full name.
E.g.: for current->name in_accel_z, the extracted generic name
is "in" (when it should be "in_accel"). This is used in generic_buffer
to generate scale and offset paths (in_accel_scale).
Consider the in_ or out_ prefix when extracting the generic name
from the full name.
Signed-off-by: Irina Tirdea <[email protected]>
Reviewed-by: Daniel Baluta <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
This patch adds ABI documentation entries for in_rot_offset.
At least one user for these is present that is the HID Sensors Driver.
Signed-off-by: Haneen Mohammed <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
MAX520 and MAX521 are protocol-compatible with the already supported
chips, just have more channels.
Signed-off-by: Antonio Fiol <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)
Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
This patchset adds ABI documentation for the following attributes:
in_illuminance_scale, used atleast once in al3320a staging/iio/light/
in_illuminance_calibscale, used atleast once in cm32181
in_illuminance_input, used in cm3232 at least once
in_illuminance_raw used atleast once in al3320a
in_illuminance_clear_raw and in_illuminance_ir_raw exposed by
gp2ap020a00f with modifiers IIO_MOD_LIGHT_CLEAR and
IIO_MOD_LIGHT_IR respectively.
Signed-off-by: Darshana Padmadas <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
This adds support for the LIS3LV02 accelerometer found in the
ST Microelectronics Nomadik board series.
Cc: [email protected]
Cc: Denis CIOCCA <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
|
|
This patch fixes the checkpatch.pl error:
ERROR: "foo * bar" should be "foo *bar"
+int ddk750_initHw(initchip_param_t * pInitParam)
Signed-off-by: Helen Fornazier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes the checkpatch.pl error:
ERROR: trailing statements should be on next line
Signed-off-by: Helen Fornazier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes the checkpatch.pl error:
ERROR: space required after that ',' (ctx:VxV)
Signed-off-by: Helen Fornazier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes the checkpatch.pl warnings:
ERROR: space required before the open parenthesis '('
+ switch(divisor) {
ERROR: space required before the open parenthesis '('
+ switch(divisor) {
ERROR: space required before the open parenthesis '('
+ switch(reg) {
Signed-off-by: Helen Fornazier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fix the checkpatch.pl warning:
ERROR: space required before the open parenthesis '('
Signed-off-by: Helen Fornazier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes the checkpatch.pl warnings:
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '<=' (ctx:VxV)
ERROR: spaces required around that '>' (ctx:VxV)
ERROR: space required before the open parenthesis '('
ERROR: space required after that ';' (ctx:VxV)
Signed-off-by: Helen Fornazier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes the checkpatch.pl errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'
WARNING: braces {} are not necessary for single statement blocks
ERROR: space required before the open brace '{'
Signed-off-by: Helen Fornazier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes checkpatch.pl warning:
WARNING: missing space after struct definition
+typedef struct _pllcalparam{
Signed-off-by: Helen Fornazier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Removing code guarded by undefined macro SLIC_TRACE_DUMP_ENABLED
Signed-off-by: Niranjan Dighe <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
the comparison is always true as the dev_t has been initialized in the
init function and we are sending that initialized dev_t to the
cleanup().
Signed-off-by: Sudip Mukherjee <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Benjamin Romer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|