FIFO_MODE() is a macro expression with a '<<' operator, which gcc points
out could be misread as a '<':
drivers/input/misc/adxl34x.c: In function 'adxl34x_probe':
drivers/input/misc/adxl34x.c:799:36: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context]
While utility of this warning is being disputed (Chief Penguin: "This
warning is clearly pure garbage.") FIFO_MODE() extracts range of values,
with 0 being FIFO_BYPASS, and not something that is logically boolean.
This converts the test to an explicit comparison with FIFO_BYPASS,
making it clearer to gcc and the reader what is intended.
Fixes: e27c729219 ("Input: add driver for ADXL345/346 Digital Accelerometers")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Signed-off-by: Paul Gortmaker <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Use the wrapper function for retrieving the platform data instead
of accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Fugang Duan <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Only use the defines which are defined in the platform_data include
file.
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Michael Hennerich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
The datasheet doesn't say anything about writing twice, so this was
probably overlooked.
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Michael Hennerich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
With commit 67d0a07544 we mark strict_strtox
as obsolete. Convert all remaining such uses in drivers/input/.
Also change long to appropriate types, and return error conditions
from kstrtox separately, as Dmitry sugguests.
Signed-off-by: JJ Ding <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
A pending cleanup will mean that module.h won't be implicitly
everywhere anymore. Make sure the modular drivers in input dir
are actually calling out for <module.h> explicitly in advance.
Signed-off-by: Paul Gortmaker <[email protected]>
Do not mark device as desabled on startup - otherwise user must reset
disable sysfs hook before the driver delivers any data.
Signed-off-by: Michael Hennerich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
These are a couple smatch issues. In the original code, if only one of
the allocation fails we leak the other variable so we should goto
out_free_mem.
Also there was a use after free if debugging was enabled and so I moved
the kfree() down a line.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Suspending and resuming the device should be separate from enabling
and disabling it through sysfs attribute and thus should not alter
ac->disabled flag.
[[email protected]: various fixups]
Tested-by: Michael Hennerich <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>